From: Andre Noll Date: Tue, 20 May 2025 20:58:13 +0000 (+0200) Subject: wmadec: Kill pointless start/end computations. X-Git-Url: https://git.tuebingen.mpg.de/?a=commitdiff_plain;h=4071b2dd1fd80737738f5b2dbd9410deb407229b;p=paraslash.git wmadec: Kill pointless start/end computations. Neither start nor end are used. The loop simply adds up the entries of one line of the exponent_bands matrix. Found by the clang analyzer. --- diff --git a/wmadec_filter.c b/wmadec_filter.c index ebb83e6f..4eabf88e 100644 --- a/wmadec_filter.c +++ b/wmadec_filter.c @@ -208,16 +208,8 @@ static void compute_scale_factor_band_sizes(struct private_wmadec_data *pwd, / ahi->sample_rate + 0.5); n = exponent_size; pos = 0; - for (i = 0; i < n; i++) { - int start, end; - start = pos; + for (i = 0; i < n; i++) pos += pwd->exponent_bands[k][i]; - end = pos; - if (start < pwd->high_band_start[k]) - start = pwd->high_band_start[k]; - if (end > pwd->coefs_end[k]) - end = pwd->coefs_end[k]; - } } }