diff options
author | Max Kellermann <max@duempel.org> | 2012-06-12 19:21:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-06-12 19:31:19 +0200 |
commit | 055257a210015a623062ad3ad3cb8a40fbc6839f (patch) | |
tree | c2e9f0562dc9c6d9719921f3851b52dd4cc2fc87 /src/output_thread.c | |
parent | 50cfb997ccbbebd6387f2f2cfbc3279d8426020f (diff) | |
download | mpd-055257a210015a623062ad3ad3cb8a40fbc6839f.tar.gz mpd-055257a210015a623062ad3ad3cb8a40fbc6839f.tar.xz mpd-055257a210015a623062ad3ad3cb8a40fbc6839f.zip |
audio-parser, output_thread: work around -Wmaybe-uninitialized
False positives in gcc 4.7.
Diffstat (limited to 'src/output_thread.c')
-rw-r--r-- | src/output_thread.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/output_thread.c b/src/output_thread.c index bf56ca971..4f3ab3e49 100644 --- a/src/output_thread.c +++ b/src/output_thread.c @@ -29,6 +29,7 @@ #include "filter/convert_filter_plugin.h" #include "filter/replay_gain_filter_plugin.h" #include "mpd_error.h" +#include "gcc.h" #include <glib.h> @@ -438,6 +439,10 @@ ao_play_chunk(struct audio_output *ao, const struct music_chunk *chunk) } size_t size; +#if GCC_CHECK_VERSION(4,7) + /* workaround -Wmaybe-uninitialized false positive */ + size = 0; +#endif const char *data = ao_filter_chunk(ao, chunk, &size); if (data == NULL) { ao_close(ao, false); |