Newer versions of Clang detect this and emit warnings for it.
Showing the changes to libavcodec/aaccoder.c (1 of 8 files). Show all
Unified · Split
| @@ -414,11 +414,10 @@ static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s, · 413 unmodified lines | |||
| 414 | start = 0; | 414 | start = 0; |
| 415 | for (g = 0; g < sce->ics.num_swb; g++) { | 415 | for (g = 0; g < sce->ics.num_swb; g++) { |
| 416 | int nz = 0; | 416 | int nz = 0; |
| 417 | float uplim = 0.0f, energy = 0.0f; | 417 | float uplim = 0.0f; |
| 418 | for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { | 418 | for (w2 = 0; w2 < sce->ics.group_len[w]; w2++) { |
| 419 | FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; | 419 | FFPsyBand *band = &s->psy.ch[s->cur_channel].psy_bands[(w+w2)*16+g]; |
| 420 | uplim += band->threshold; | 420 | uplim += band->threshold; |
| 421 | energy += band->energy; | ||
| 422 | if (band->energy <= band->threshold || band->threshold == 0.0f) { | 421 | if (band->energy <= band->threshold || band->threshold == 0.0f) { |
| 423 | sce->zeroes[(w+w2)*16+g] = 1; | 422 | sce->zeroes[(w+w2)*16+g] = 1; |
| 424 | continue; | 423 | continue; |