mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-14 15:28:13 +00:00
Fixed bug 4315 - little Warning in Android_JNI_CaptureAudioBuffer
Sylvain SDL_android.c src/core/android/SDL_android.c:1302:5: warning: variable 'br' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ src/core/android/SDL_android.c:1306:12: note: uninitialized use occurs here return br; ^~ src/core/android/SDL_android.c:1270:12: note: initialize the variable 'br' to silence this warning jint br; ^ Maybe we could add some basics warning flags, not to see all warnings, but so that new warnings are caught sooner. I would go for -Wall -Wextra, and some -Wno-warning for the allowed warnings.
This commit is contained in:
@@ -1261,7 +1261,7 @@ int Android_JNI_CaptureAudioBuffer(void *buffer, int buflen)
|
||||
{
|
||||
JNIEnv *env = Android_JNI_GetEnv();
|
||||
jboolean isCopy = JNI_FALSE;
|
||||
jint br;
|
||||
jint br = -1;
|
||||
|
||||
switch (captureBufferFormat) {
|
||||
case ENCODING_PCM_8BIT:
|
||||
|
Reference in New Issue
Block a user