Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
055257a2
Commit
055257a2
authored
Jun 12, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
audio-parser, output_thread: work around -Wmaybe-uninitialized
False positives in gcc 4.7.
parent
50cfb997
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
audio_parser.c
src/audio_parser.c
+11
-0
output_thread.c
src/output_thread.c
+5
-0
No files found.
src/audio_parser.c
View file @
055257a2
...
...
@@ -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>
...
...
@@ -160,6 +161,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
;
...
...
@@ -171,6 +177,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
;
...
...
src/output_thread.c
View file @
055257a2
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment