AssignSegments: quiet array-bounds warning

nb (enc->segment_hdr_.num_segments_) will be in the range
[1, NUM_MB_SEGMENTS].

Change-Id: I5c2bd0bb82b17c99aff39c98b6b1747fc040dc16
This commit is contained in:
James Zern 2014-03-14 18:47:52 -07:00
parent 3c2ebf58a4
commit 3e7f34a3fb

View File

@ -151,6 +151,7 @@ static void AssignSegments(VP8Encoder* const enc,
int accum[NUM_MB_SEGMENTS], dist_accum[NUM_MB_SEGMENTS]; int accum[NUM_MB_SEGMENTS], dist_accum[NUM_MB_SEGMENTS];
assert(nb >= 1); assert(nb >= 1);
assert(nb <= NUM_MB_SEGMENTS);
// bracket the input // bracket the input
for (n = 0; n <= MAX_ALPHA && alphas[n] == 0; ++n) {} for (n = 0; n <= MAX_ALPHA && alphas[n] == 0; ++n) {}