From 4071b2dd1fd80737738f5b2dbd9410deb407229b Mon Sep 17 00:00:00 2001 From: Andre Noll <maan@tuebingen.mpg.de> Date: Tue, 20 May 2025 22:58:13 +0200 Subject: [PATCH] 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. --- wmadec_filter.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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]; - } } } -- 2.39.5