diff options
author | Max Kellermann <max@duempel.org> | 2012-06-12 23:22:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-06-12 23:22:03 +0200 |
commit | 4eb57e1e9a1718ce93eced6bd4fb06d8abb26477 (patch) | |
tree | 2355c6d77273cf614822f5a144005ab1d353863b /src/audio_parser.c | |
parent | d662c4c0cc089a6a493a7463e440f0f7e7959b48 (diff) | |
parent | 1d52e2cc7727d93e65d557c322b5dd7dc149651c (diff) | |
download | mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.gz mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.tar.xz mpd-4eb57e1e9a1718ce93eced6bd4fb06d8abb26477.zip |
Merge branch 'v0.16.x'
Conflicts:
src/cmdline.c
src/decoder/wildmidi_decoder_plugin.c
src/gcc.h
src/glib_compat.h
src/input_stream.c
src/output_list.c
src/output_thread.c
valgrind.suppressions
Diffstat (limited to 'src/audio_parser.c')
-rw-r--r-- | src/audio_parser.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/audio_parser.c b/src/audio_parser.c index b1be8887a..152eab5d4 100644 --- a/src/audio_parser.c +++ b/src/audio_parser.c @@ -26,6 +26,7 @@ #include "audio_parser.h" #include "audio_format.h" #include "audio_check.h" +#include "gcc.h" #include <assert.h> #include <string.h> @@ -172,6 +173,11 @@ audio_format_parse(struct audio_format *dest, const char *src, /* parse sample rate */ +#if GCC_CHECK_VERSION(4,7) + /* workaround -Wmaybe-uninitialized false positive */ + rate = 0; +#endif + if (!parse_sample_rate(src, mask, &rate, &src, error_r)) return false; @@ -183,6 +189,11 @@ audio_format_parse(struct audio_format *dest, const char *src, /* parse sample format */ +#if GCC_CHECK_VERSION(4,7) + /* workaround -Wmaybe-uninitialized false positive */ + sample_format = SAMPLE_FORMAT_UNDEFINED; +#endif + if (!parse_sample_format(src, mask, &sample_format, &src, error_r)) return false; |