From 41a6bb58d114d5943235aa6d0410eafd07a2c642 Mon Sep 17 00:00:00 2001 From: Marco Lizza Date: Tue, 4 Feb 2020 17:03:48 +0100 Subject: [PATCH] Other (pedantic) warnings for possible uninitialized variables. --- stb_vorbis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stb_vorbis.c b/stb_vorbis.c index 602d9df..0d02301 100644 --- a/stb_vorbis.c +++ b/stb_vorbis.c @@ -3969,7 +3969,7 @@ static int start_decoder(vorb *f) g->sorted_order[j] = (uint8) p[j].id; // precompute the neighbors for (j=2; j < g->values; ++j) { - int low,hi; + int low = 0,hi = 0; neighbors(g->Xlist, j, &low,&hi); g->neighbors[j][0] = low; g->neighbors[j][1] = hi; @@ -4673,7 +4673,7 @@ static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number) ProbedPage left, right, mid; int i, start_seg_with_known_loc, end_pos, page_start; uint32 delta, stream_length, padding, last_sample_limit; - double offset, bytes_per_sample; + double offset = 0.0, bytes_per_sample = 0.0; int probe = 0; // find the last page and validate the target sample @@ -5225,7 +5225,7 @@ static void convert_samples_short(int buf_c, short **buffer, int b_offset, int d int stb_vorbis_get_frame_short(stb_vorbis *f, int num_c, short **buffer, int num_samples) { - float **output; + float **output = NULL; int len = stb_vorbis_get_frame_float(f, NULL, &output); if (len > num_samples) len = num_samples; if (len)