aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/song_update.c5
-rw-r--r--src/udp_server.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/song_update.c b/src/song_update.c
index 1d8f22d4d..37f502a20 100644
--- a/src/song_update.c
+++ b/src/song_update.c
@@ -113,6 +113,11 @@ song_file_update(struct song *song)
GMutex *mutex = NULL;
GCond *cond;
+#if !GCC_CHECK_VERSION(4, 2)
+ /* work around "may be used uninitialized in this function"
+ false positive */
+ cond = NULL;
+#endif
do {
/* load file tag */
diff --git a/src/udp_server.c b/src/udp_server.c
index e70f785e2..f96b40b6b 100644
--- a/src/udp_server.c
+++ b/src/udp_server.c
@@ -97,6 +97,9 @@ udp_server_new(unsigned port,
.s_addr = htonl(INADDR_ANY),
},
.sin_port = htons(port),
+#if defined(__linux__) && !GCC_CHECK_VERSION(4, 2)
+ .sin_zero = { 0 },
+#endif
};
if (bind(fd, (const struct sockaddr *)&address, sizeof(address)) < 0) {