From acd3bce9b4e8b230934ce16e163d361909c543b0 Mon Sep 17 00:00:00 2001
From: Jean-Marc Valin <jmvalin@jmvalin.ca>
Date: Sat, 29 Oct 2011 17:46:18 -0400
Subject: [PATCH] Removes "set but never used" variables

---
 silk/fixed/find_LPC_FIX.c             | 7 ++-----
 silk/fixed/noise_shape_analysis_FIX.c | 4 ----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/silk/fixed/find_LPC_FIX.c b/silk/fixed/find_LPC_FIX.c
index c11826e5e..46192734f 100644
--- a/silk/fixed/find_LPC_FIX.c
+++ b/silk/fixed/find_LPC_FIX.c
@@ -52,8 +52,8 @@ void silk_find_LPC_FIX(
     opus_int     rshift0, rshift1;
 
     /* Used only for LSF interpolation */
-    opus_int32   a_tmp_Q16[ MAX_LPC_ORDER ], res_nrg_interp, res_nrg, res_tmp_nrg, res_nrg_2nd;
-    opus_int     res_nrg_interp_Q, res_nrg_Q, res_tmp_nrg_Q, res_nrg_2nd_Q;
+    opus_int32   a_tmp_Q16[ MAX_LPC_ORDER ], res_nrg_interp, res_nrg, res_tmp_nrg;
+    opus_int     res_nrg_interp_Q, res_nrg_Q, res_tmp_nrg_Q;
     opus_int16   a_tmp_Q12[ MAX_LPC_ORDER ];
     opus_int16   NLSF0_Q15[ MAX_LPC_ORDER ];
     opus_int16   LPC_res[ ( MAX_FRAME_LENGTH + MAX_NB_SUBFR * MAX_LPC_ORDER ) / 2 ];
@@ -95,7 +95,6 @@ void silk_find_LPC_FIX(
         silk_A2NLSF( NLSF_Q15, a_tmp_Q16, LPC_order );
 
         /* Search over interpolation indices to find the one with lowest residual energy */
-        res_nrg_2nd = silk_int32_MAX;
         for( k = 3; k >= 0; k-- ) {
             /* Interpolate NLSFs for first half */
             silk_interpolate( NLSF0_Q15, prev_NLSFq_Q15, NLSF_Q15, k, LPC_order );
@@ -147,8 +146,6 @@ void silk_find_LPC_FIX(
                 res_nrg_Q = res_nrg_interp_Q;
                 *interpIndex = (opus_int8)k;
             }
-            res_nrg_2nd   = res_nrg_interp;
-            res_nrg_2nd_Q = res_nrg_interp_Q;
         }
     }
 
diff --git a/silk/fixed/noise_shape_analysis_FIX.c b/silk/fixed/noise_shape_analysis_FIX.c
index d2ed8e0e3..d85c8ed90 100644
--- a/silk/fixed/noise_shape_analysis_FIX.c
+++ b/silk/fixed/noise_shape_analysis_FIX.c
@@ -155,7 +155,6 @@ void silk_noise_shape_analysis_FIX(
     opus_int32   AR1_Q24[       MAX_SHAPE_LPC_ORDER ];
     opus_int32   AR2_Q24[       MAX_SHAPE_LPC_ORDER ];
     opus_int16   x_windowed[    SHAPE_LPC_WIN_MAX ];
-    opus_int32   sqrt_nrg[ MAX_NB_SUBFR ], Qnrg_vec[ MAX_NB_SUBFR ];
     const opus_int16 *x_ptr, *pitch_res_ptr;
 
     /* Point to start of first LPC analysis block */
@@ -304,9 +303,6 @@ void silk_noise_shape_analysis_FIX(
         tmp32 = silk_SQRT_APPROX( nrg );
         Qnrg >>= 1;             /* range: -6...15*/
 
-        sqrt_nrg[ k ] = tmp32;
-        Qnrg_vec[ k ] = Qnrg;
-
         psEncCtrl->Gains_Q16[ k ] = silk_LSHIFT_SAT32( tmp32, 16 - Qnrg );
 
         if( psEnc->sCmn.warping_Q16 > 0 ) {
-- 
GitLab