Fix warning for Android NDK compiler: "function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]"

https://stackoverflow.com/questions/42125/warning-error-function-declaration-isnt-a-prototype
In C int foo() and int foo(void) are different functions. int foo() accepts an arbitrary number of arguments, while int foo(void) accepts 0 arguments. In C++ they mean the same thing.
This commit is contained in:
Amir 2024-07-17 22:09:32 +04:00 committed by Sam Lantinga
parent 94c40fb3c9
commit 5db08b86ca
44 changed files with 101 additions and 101 deletions

View file

@ -898,18 +898,18 @@ JNIEXPORT void JNICALL SDL_JAVA_INTERFACE(onNativeDropFile)(
}
/* Lock / Unlock Mutex */
void Android_ActivityMutex_Lock()
void Android_ActivityMutex_Lock(void)
{
SDL_LockMutex(Android_ActivityMutex);
}
void Android_ActivityMutex_Unlock()
void Android_ActivityMutex_Unlock(void)
{
SDL_UnlockMutex(Android_ActivityMutex);
}
/* Lock the Mutex when the Activity is in its 'Running' state */
void Android_ActivityMutex_Lock_Running()
void Android_ActivityMutex_Lock_Running(void)
{
int pauseSignaled = 0;
int resumeSignaled = 0;
@ -1561,13 +1561,13 @@ void Android_JNI_SetOrientation(int w, int h, int resizable, const char *hint)
(*env)->DeleteLocalRef(env, jhint);
}
void Android_JNI_MinizeWindow()
void Android_JNI_MinizeWindow(void)
{
JNIEnv *env = Android_JNI_GetEnv();
(*env)->CallStaticVoidMethod(env, mActivityClass, midMinimizeWindow);
}
SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss()
SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void)
{
JNIEnv *env = Android_JNI_GetEnv();
return (*env)->CallStaticBooleanMethod(env, mActivityClass, midShouldMinimizeOnFocusLoss);
@ -1947,7 +1947,7 @@ static SDL_bool Android_JNI_ExceptionOccurred(SDL_bool silent)
return SDL_FALSE;
}
static void Internal_Android_Create_AssetManager()
static void Internal_Android_Create_AssetManager(void)
{
struct LocalReferenceHolder refs = LocalReferenceHolder_Setup(__FUNCTION__);
@ -1986,7 +1986,7 @@ static void Internal_Android_Create_AssetManager()
LocalReferenceHolder_Cleanup(&refs);
}
static void Internal_Android_Destroy_AssetManager()
static void Internal_Android_Destroy_AssetManager(void)
{
JNIEnv *env = Android_JNI_GetEnv();
@ -2206,7 +2206,7 @@ int Android_JNI_GetPowerInfo(int *plugged, int *charged, int *battery, int *seco
}
/* Add all touch devices */
void Android_JNI_InitTouch()
void Android_JNI_InitTouch(void)
{
JNIEnv *env = Android_JNI_GetEnv();
(*env)->CallStaticVoidMethod(env, mActivityClass, midInitTouch);