aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_parser.c')
-rw-r--r--src/audio_parser.c11
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;