From 6a9f457102beaab06051ebcde669dfba8612528b Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 27 Oct 2017 14:11:33 +0200 Subject: 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.) --- audio/out/pull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio') 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); -- cgit v1.2.3