Commit e7ce362d authored by Max Kellermann's avatar Max Kellermann

song_update, udp_server: workarounds for gcc 4.1 warnings

Annoying false positives.
parent c551c8b3
......@@ -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 */
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment