aboutsummaryrefslogtreecommitdiffhomepage
path: root/audio/out
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2017-10-27 14:11:33 +0200
committerGravatar wm4 <wm4@nowhere>2017-10-27 14:11:33 +0200
commit6a9f457102beaab06051ebcde669dfba8612528b (patch)
tree828a501958e294fa1f5fd87fe8882fd77d9631b8 /audio/out
parentc54673b86f7a6c923a2d625a31702cf053c5fa52 (diff)
audio/out: initialize an array to avoid confusing static analyzer
I _think_ this confuses Coverity and it thinks there is uninitialized data to be read. Initialize the array to change/remove the warning, or if there's a real problem, to make it easier to detect. (Basically apply defensive coding.)
Diffstat (limited to 'audio/out')
-rw-r--r--audio/out/pull.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/audio/out/pull.c b/audio/out/pull.c
index fc8844a136..89aa98d52f 100644
--- a/audio/out/pull.c
+++ b/audio/out/pull.c
@@ -190,7 +190,7 @@ int ao_read_data_converted(struct ao *ao, struct ao_convert_fmt *fmt,
assert(ao->api == &ao_api_pull);
struct ao_pull_state *p = ao->api_priv;
- void *ndata[MP_NUM_CHANNELS];
+ void *ndata[MP_NUM_CHANNELS] = {0};
if (!ao_need_conversion(fmt))
return ao_read_data(ao, data, samples, out_time_us);