mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-26 16:41:36 +00:00
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:
@@ -97,7 +97,7 @@ void SDL_UnregisterApp(void)
|
||||
|
||||
/* Returns SDL_WinRT_DeviceFamily enum */
|
||||
SDL_DECLSPEC int SDLCALL SDL_GetWinRTDeviceFamily(void);
|
||||
int SDL_GetWinRTDeviceFamily()
|
||||
int SDL_GetWinRTDeviceFamily(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return 0; /* SDL_WINRT_DEVICEFAMILY_UNKNOWN */
|
||||
@@ -115,20 +115,20 @@ const char *SDL_GetWinRTFSPath(int pathType)
|
||||
#ifndef SDL_PLATFORM_ANDROID
|
||||
|
||||
SDL_DECLSPEC void SDLCALL SDL_SendAndroidBackButton(void);
|
||||
void SDL_SendAndroidBackButton()
|
||||
void SDL_SendAndroidBackButton(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void *SDLCALL SDL_GetAndroidActivity(void);
|
||||
void *SDL_GetAndroidActivity()
|
||||
void *SDL_GetAndroidActivity(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC const char *SDLCALL SDL_GetAndroidCachePath(void);
|
||||
const char* SDL_GetAndroidCachePath()
|
||||
const char* SDL_GetAndroidCachePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
@@ -136,7 +136,7 @@ const char* SDL_GetAndroidCachePath()
|
||||
|
||||
|
||||
SDL_DECLSPEC const char *SDLCALL SDL_GetAndroidExternalStoragePath(void);
|
||||
const char* SDL_GetAndroidExternalStoragePath()
|
||||
const char* SDL_GetAndroidExternalStoragePath(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
@@ -156,7 +156,7 @@ const char *SDL_GetAndroidInternalStoragePath(void)
|
||||
}
|
||||
|
||||
SDL_DECLSPEC void *SDLCALL SDL_GetAndroidJNIEnv(void);
|
||||
void *SDL_GetAndroidJNIEnv()
|
||||
void *SDL_GetAndroidJNIEnv(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return NULL;
|
||||
@@ -192,20 +192,20 @@ int SDL_ShowAndroidToast(const char* message, int duration, int gravity, int xof
|
||||
}
|
||||
|
||||
SDL_DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
|
||||
int SDL_GetAndroidSDKVersion()
|
||||
int SDL_GetAndroidSDKVersion(void)
|
||||
{
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
SDL_DECLSPEC SDL_bool SDLCALL SDL_IsAndroidTV(void);
|
||||
SDL_bool SDL_IsAndroidTV()
|
||||
SDL_bool SDL_IsAndroidTV(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
SDL_DECLSPEC SDL_bool SDLCALL SDL_IsChromebook(void);
|
||||
SDL_bool SDL_IsChromebook()
|
||||
SDL_bool SDL_IsChromebook(void)
|
||||
{
|
||||
SDL_Unsupported();
|
||||
return SDL_FALSE;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -133,7 +133,7 @@ static void kbd_cleanup_signal_action(int signum, siginfo_t *info, void *ucontex
|
||||
SDL_EVDEV_kbd_reraise_signal(signum);
|
||||
}
|
||||
|
||||
static void kbd_unregister_emerg_cleanup()
|
||||
static void kbd_unregister_emerg_cleanup(void)
|
||||
{
|
||||
int tabidx;
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ static SDL_WSCONS_input_data *SDL_WSCONS_Init_Keyboard(const char *dev)
|
||||
return input;
|
||||
}
|
||||
|
||||
void SDL_WSCONS_Init()
|
||||
void SDL_WSCONS_Init(void)
|
||||
{
|
||||
inputs[0] = SDL_WSCONS_Init_Keyboard("/dev/wskbd0");
|
||||
inputs[1] = SDL_WSCONS_Init_Keyboard("/dev/wskbd1");
|
||||
@@ -463,7 +463,7 @@ void SDL_WSCONS_Init()
|
||||
return;
|
||||
}
|
||||
|
||||
void SDL_WSCONS_Quit()
|
||||
void SDL_WSCONS_Quit(void)
|
||||
{
|
||||
int i = 0;
|
||||
SDL_WSCONS_input_data *input = NULL;
|
||||
@@ -924,7 +924,7 @@ static void updateKeyboard(SDL_WSCONS_input_data *input)
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_WSCONS_PumpEvents()
|
||||
void SDL_WSCONS_PumpEvents(void)
|
||||
{
|
||||
int i = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef struct SDL_WSCONS_mouse_input_data
|
||||
SDL_MouseID mouseID;
|
||||
} SDL_WSCONS_mouse_input_data;
|
||||
|
||||
SDL_WSCONS_mouse_input_data *SDL_WSCONS_Init_Mouse()
|
||||
SDL_WSCONS_mouse_input_data *SDL_WSCONS_Init_Mouse(void)
|
||||
{
|
||||
#ifdef WSMOUSEIO_SETVERSION
|
||||
int version = WSMOUSE_EVENT_VERSION;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "SDL_appid.h"
|
||||
#include <unistd.h>
|
||||
|
||||
const char *SDL_GetExeName()
|
||||
const char *SDL_GetExeName(void)
|
||||
{
|
||||
static const char *proc_name = NULL;
|
||||
|
||||
@@ -57,7 +57,7 @@ const char *SDL_GetExeName()
|
||||
return proc_name;
|
||||
}
|
||||
|
||||
const char *SDL_GetAppID()
|
||||
const char *SDL_GetAppID(void)
|
||||
{
|
||||
/* Always check the hint, as it may have changed */
|
||||
const char *id_str = SDL_GetHint(SDL_HINT_APP_ID);
|
||||
|
||||
Reference in New Issue
Block a user