diff options
author | Cameron Cawley | 2019-07-23 17:21:09 +0100 |
---|---|---|
committer | Cameron Cawley | 2019-07-23 17:21:09 +0100 |
commit | 357493082fb9b6b7e66f05394db839da761bbb29 (patch) | |
tree | 12101bd0cdaa3ff03e5b13ebc751a2603ce13684 /backends/platform/android/android.cpp | |
parent | 1f2882b5a3b07c675a152f2f5e553f40c4bbd5b5 (diff) | |
download | scummvm-rg350-357493082fb9b6b7e66f05394db839da761bbb29.tar.gz scummvm-rg350-357493082fb9b6b7e66f05394db839da761bbb29.tar.bz2 scummvm-rg350-357493082fb9b6b7e66f05394db839da761bbb29.zip |
ANDROID: Fix some Codacy warnings
Diffstat (limited to 'backends/platform/android/android.cpp')
-rw-r--r-- | backends/platform/android/android.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp index 4f1b852d26..f3dc0b5876 100644 --- a/backends/platform/android/android.cpp +++ b/backends/platform/android/android.cpp @@ -231,9 +231,7 @@ void *OSystem_Android::audioThreadFunc(void *arg) { bool paused = true; - byte *buf; - int offset, left, written; - int samples, i; + int offset, left, written, i; struct timespec tv_delay; tv_delay.tv_sec = 0; @@ -245,7 +243,6 @@ void *OSystem_Android::audioThreadFunc(void *arg) { tv_full.tv_sec = 0; tv_full.tv_nsec = msecs_full * 1000 * 1000; - bool silence; uint silence_count = 33; while (!system->_audio_thread_exit) { @@ -260,12 +257,12 @@ void *OSystem_Android::audioThreadFunc(void *arg) { LOGD("audio thread woke up"); } - buf = (byte *)env->GetPrimitiveArrayCritical(bufa, 0); + byte *buf = (byte *)env->GetPrimitiveArrayCritical(bufa, 0); assert(buf); - samples = mixer->mixCallback(buf, buf_size); + int samples = mixer->mixCallback(buf, buf_size); - silence = samples < 1; + bool silence = samples < 1; // looks stupid, and it is, but currently there's no way to detect // silence-only buffers from the mixer |