From 3c1f96f279b0dde194b1541122f6fd543bb5d32b Mon Sep 17 00:00:00 2001 From: "kma@webrtc.org" Date: Thu, 6 Sep 2012 16:20:03 +0000 Subject: [PATCH] Fixed several places for compiler warnings. To reproduce, use compiler arm-linux-androideabi-gcc (GCC) 4.6.x-google 20120106 (prerelease). Review URL: https://webrtc-codereview.appspot.com/762011 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2712 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/audio_coding/codecs/isac/fix/test/kenny.c | 6 +++--- .../main/source/android/video_render_android_impl.cc | 2 +- src/system_wrappers/source/condition_variable_posix.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/audio_coding/codecs/isac/fix/test/kenny.c b/src/modules/audio_coding/codecs/isac/fix/test/kenny.c index 8b04c98ec5..71cddb66a7 100644 --- a/src/modules/audio_coding/codecs/isac/fix/test/kenny.c +++ b/src/modules/audio_coding/codecs/isac/fix/test/kenny.c @@ -124,10 +124,10 @@ int main(int argc, char* argv[]) char version_number[20]; char tmpBit[5] = ".bit"; - double kbps; int totalbits =0; int totalsmpls =0; #ifdef _DEBUG + double kbps; FILE *fy; #endif WebRtc_Word16 testNum, testCE; @@ -793,8 +793,6 @@ int main(int argc, char* argv[]) totalsmpls += declen; totalbits += 8 * stream_len; - kbps = ((double) FS) / ((double) cur_framesmpls) * 8.0 * - stream_len / 1000.0;// kbits/s /* Error test number 10, garbage data */ if (testNum == 10) { @@ -809,6 +807,8 @@ int main(int argc, char* argv[]) #ifdef _DEBUG + kbps = ((double) FS) / ((double) cur_framesmpls) * 8.0 * + stream_len / 1000.0;// kbits/s fy = fopen("bit_rate.dat", "a"); fprintf(fy, "Frame %i = %0.14f\n", framecnt, kbps); fclose(fy); diff --git a/src/modules/video_render/main/source/android/video_render_android_impl.cc b/src/modules/video_render/main/source/android/video_render_android_impl.cc index 9e709cb5eb..0107afefa3 100644 --- a/src/modules/video_render/main/source/android/video_render_android_impl.cc +++ b/src/modules/video_render/main/source/android/video_render_android_impl.cc @@ -248,7 +248,7 @@ bool VideoRenderAndroid::JavaRenderThreadProcess() WEBRTC_TRACE(kTraceInfo, kTraceVideoRenderer, _id, "%s: Java thread detached", __FUNCTION__); } - _javaRenderJniEnv = false; + _javaRenderJniEnv = NULL; _javaShutDownFlag = false; _javaShutdownEvent.Set(); return false; // Do not run this thread again. diff --git a/src/system_wrappers/source/condition_variable_posix.cc b/src/system_wrappers/source/condition_variable_posix.cc index 48835abec1..65f9a45ba2 100644 --- a/src/system_wrappers/source/condition_variable_posix.cc +++ b/src/system_wrappers/source/condition_variable_posix.cc @@ -45,10 +45,10 @@ ConditionVariablePosix::ConditionVariablePosix() int ConditionVariablePosix::Construct() { - int result = 0; #ifdef WEBRTC_CLOCK_TYPE_REALTIME - result = pthread_cond_init(&_cond, NULL); + pthread_cond_init(&_cond, NULL); #else + int result = 0; pthread_condattr_t condAttr; result = pthread_condattr_init(&condAttr); if (result != 0)