From c7d5f6249b7da6d056ba4f004d644e1053f2e42e Mon Sep 17 00:00:00 2001 From: "tommi@webrtc.org" Date: Wed, 31 Aug 2011 12:11:24 +0000 Subject: [PATCH] Fix build errors on Windows. Since this is a C file, variables must be declared at the top of the function so I'm moving the fix for the warning (inst = NULL) to the bottom of the funciton. Otherwise, the compiler will complain when it sees int i; on systems that do not have WEBRTC_BIG_ENDIAN defined. Review URL: http://webrtc-codereview.appspot.com/139005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@494 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_coding/codecs/PCM16B/main/source/pcm16b.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/audio_coding/codecs/PCM16B/main/source/pcm16b.c b/src/modules/audio_coding/codecs/PCM16B/main/source/pcm16b.c index ac15eb8754..0cff5dd29d 100644 --- a/src/modules/audio_coding/codecs/PCM16B/main/source/pcm16b.c +++ b/src/modules/audio_coding/codecs/PCM16B/main/source/pcm16b.c @@ -68,7 +68,6 @@ WebRtc_Word16 WebRtcPcm16b_DecodeW16(void *inst, WebRtc_Word16 *speechOut16b, WebRtc_Word16* speechType) { - (void)(inst = NULL); #ifdef WEBRTC_BIG_ENDIAN WEBRTC_SPL_MEMCPY_W8(speechOut16b, speechIn16b, ((len*sizeof(WebRtc_Word16)+1)>>1)); #else @@ -81,6 +80,10 @@ WebRtc_Word16 WebRtcPcm16b_DecodeW16(void *inst, #endif *speechType=1; + + // Avoid warning. + (void)(inst = NULL); + return(len>>1); }