From 59a93ab190b4afda2e74a03fd272116b56671038 Mon Sep 17 00:00:00 2001
From: Christian Hoene <hoene@uni-tuebingen.de>
Date: Mon, 25 Jul 2011 09:04:51 -0400
Subject: [PATCH] Fixes some compiler warnings

---
 libcelt/float_cast.h | 25 ++++++++++++-------------
 silk/silk_enc_API.c  |  1 -
 src/test_opus.c      |  2 +-
 3 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/libcelt/float_cast.h b/libcelt/float_cast.h
index 72c17146f..df546adb9 100644
--- a/libcelt/float_cast.h
+++ b/libcelt/float_cast.h
@@ -59,23 +59,22 @@
 */
 
 #if (HAVE_LRINTF)
-/*#if 0*/
 
-	/*	These defines enable functionality introduced with the 1999 ISO C
-	**	standard. They must be defined before the inclusion of math.h to
-	**	engage them. If optimisation is enabled, these functions will be 
-	**	inlined. With optimisation switched off, you have to link in the
-	**	maths library using -lm.
-	*/
+/*	These defines enable functionality introduced with the 1999 ISO C
+**	standard. They must be defined before the inclusion of math.h to
+**	engage them. If optimisation is enabled, these functions will be 
+**	inlined. With optimisation switched off, you have to link in the
+**	maths library using -lm.
+*/
 
-	#define	_ISOC9X_SOURCE	1
-	#define _ISOC99_SOURCE	1
+#define	_ISOC9X_SOURCE	1
+#define _ISOC99_SOURCE	1
 
-	#define	__USE_ISOC9X	1
-	#define	__USE_ISOC99	1
+#define	__USE_ISOC9X	1
+#define	__USE_ISOC99	1
 
-	#include	<math.h>
-	#define float2int(x) lrintf(x)
+#include	<math.h>
+#define float2int(x) lrintf(x)
 
 #elif (defined(HAVE_LRINT))
 
diff --git a/silk/silk_enc_API.c b/silk/silk_enc_API.c
index 9824e8ff6..d3f8934a8 100644
--- a/silk/silk_enc_API.c
+++ b/silk/silk_enc_API.c
@@ -138,7 +138,6 @@ SKP_int silk_Encode(
     SKP_int   speech_act_thr_for_switch_Q8;
     SKP_int32 TargetRate_bps, MStargetRates_bps[ 2 ], channelRate_bps, LBRR_symbol;
     silk_encoder *psEnc = ( silk_encoder * )encState;
-    SKP_int   MS_predictorIx[ 2 ] = { 0 };
     SKP_int16 buf[ MAX_FRAME_LENGTH_MS * MAX_API_FS_KHZ ];
 
     /* Check values in encoder control structure */
diff --git a/src/test_opus.c b/src/test_opus.c
index 149d427f6..bff7702ce 100644
--- a/src/test_opus.c
+++ b/src/test_opus.c
@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
    int bandwidth=-1;
    const char *bandwidth_string;
    int write_samples;
-   int lost, lost_prev = 1;
+   int lost = 0, lost_prev = 1;
    int toggle = 0;
    int enc_final_range[2];
    int encode_only=0, decode_only=0;
-- 
GitLab