Fix compiler warnings in 3rd part code, stb_vorbis.c
This commit is contained in:
parent
36679de27d
commit
4bd9bc130b
|
@ -1705,9 +1705,9 @@ static int codebook_decode_scalar_raw(vorb *f, Codebook *c)
|
|||
var = f->acc & FAST_HUFFMAN_TABLE_MASK; \
|
||||
var = c->fast_huffman[var]; \
|
||||
if (var >= 0) { \
|
||||
int n = c->codeword_lengths[var]; \
|
||||
f->acc >>= n; \
|
||||
f->valid_bits -= n; \
|
||||
int _n = c->codeword_lengths[var]; \
|
||||
f->acc >>= _n; \
|
||||
f->valid_bits -= _n; \
|
||||
if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \
|
||||
} else { \
|
||||
var = codebook_decode_scalar_raw(f,c); \
|
||||
|
@ -2245,9 +2245,9 @@ static void decode_residue(vorb *f, float *residue_buffers[], int ch, int n, int
|
|||
if (b >= 0) {
|
||||
float *target = residue_buffers[j];
|
||||
int offset = r->begin + pcount * r->part_size;
|
||||
int n = r->part_size;
|
||||
int no = r->part_size;
|
||||
Codebook *book = f->codebooks + b;
|
||||
if (!residue_decode(f, book, target, offset, n, rtype))
|
||||
if (!residue_decode(f, book, target, offset, no, rtype))
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -3162,7 +3162,7 @@ static int vorbis_decode_initial(vorb *f, int *p_left_start, int *p_left_end, in
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start, int /*left_end*/, int right_start, int right_end, int *p_left)
|
||||
static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *mode, int left_start, int /*left_end*/, int right_start, int right_end, int *p_left)
|
||||
{
|
||||
Mapping *map;
|
||||
int i,j,k,n,n2;
|
||||
|
@ -3171,8 +3171,8 @@ static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start,
|
|||
|
||||
// WINDOWING
|
||||
|
||||
n = f->blocksize[m->blockflag];
|
||||
map = &f->mapping[m->mapping];
|
||||
n = f->blocksize[mode->blockflag];
|
||||
map = &f->mapping[mode->mapping];
|
||||
|
||||
// FLOORS
|
||||
n2 = n >> 1;
|
||||
|
@ -3356,7 +3356,7 @@ static int vorbis_decode_packet_rest(vorb *f, int *len, Mode *m, int left_start,
|
|||
// INVERSE MDCT
|
||||
CHECK(f);
|
||||
for (i=0; i < f->channels; ++i)
|
||||
inverse_mdct(f->channel_buffers[i], n, f, m->blockflag);
|
||||
inverse_mdct(f->channel_buffers[i], n, f, mode->blockflag);
|
||||
CHECK(f);
|
||||
|
||||
// this shouldn't be necessary, unless we exited on an error
|
||||
|
@ -4374,7 +4374,7 @@ static int vorbis_search_for_page_pushdata(vorb *f, uint8 *data, int data_len)
|
|||
// if the last frame on a page is continued to the next, then
|
||||
// we can't recover the sample_loc immediately
|
||||
if (data[i+27+data[i+26]-1] == 255)
|
||||
f->scan[n].sample_loc = ~0;
|
||||
f->scan[n].sample_loc = (uint32)~0;
|
||||
else
|
||||
f->scan[n].sample_loc = data[i+6] + (data[i+7] << 8) + (data[i+ 8]<<16) + (data[i+ 9]<<24);
|
||||
f->scan[n].bytes_done = i+j;
|
||||
|
@ -4679,7 +4679,7 @@ static int go_to_page_before(stb_vorbis *f, unsigned int limit_offset)
|
|||
// better).
|
||||
static int seek_to_sample_coarse(stb_vorbis *f, uint32 sample_number)
|
||||
{
|
||||
ProbedPage left, right, mid;
|
||||
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 = 0.0, bytes_per_sample = 0.0;
|
||||
|
|
Loading…
Reference in New Issue