mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-07-15 05:30:30 +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:
@@ -842,18 +842,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;
|
||||
@@ -1439,13 +1439,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);
|
||||
@@ -1879,7 +1879,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__);
|
||||
@@ -1918,7 +1918,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();
|
||||
|
||||
@@ -2153,7 +2153,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);
|
||||
|
||||
@@ -134,7 +134,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, signum;
|
||||
|
||||
|
||||
@@ -214,7 +214,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, signum;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ typedef struct _FcitxClient
|
||||
|
||||
static FcitxClient fcitx_client;
|
||||
|
||||
static char *GetAppName()
|
||||
static char *GetAppName(void)
|
||||
{
|
||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||
char *spot;
|
||||
@@ -368,7 +368,7 @@ static Uint32 Fcitx_ModState(void)
|
||||
return fcitx_mods;
|
||||
}
|
||||
|
||||
SDL_bool SDL_Fcitx_Init()
|
||||
SDL_bool SDL_Fcitx_Init(void)
|
||||
{
|
||||
fcitx_client.dbus = SDL_DBus_GetContext();
|
||||
|
||||
@@ -380,7 +380,7 @@ SDL_bool SDL_Fcitx_Init()
|
||||
return FcitxClientCreateIC(&fcitx_client);
|
||||
}
|
||||
|
||||
void SDL_Fcitx_Quit()
|
||||
void SDL_Fcitx_Quit(void)
|
||||
{
|
||||
FcitxClientICCallMethod(&fcitx_client, "DestroyIC");
|
||||
if (fcitx_client.ic_path) {
|
||||
|
||||
@@ -40,7 +40,7 @@ static _SDL_IME_ProcessKeyEvent SDL_IME_ProcessKeyEvent_Real = NULL;
|
||||
static _SDL_IME_UpdateTextRect SDL_IME_UpdateTextRect_Real = NULL;
|
||||
static _SDL_IME_PumpEvents SDL_IME_PumpEvents_Real = NULL;
|
||||
|
||||
static void InitIME()
|
||||
static void InitIME(void)
|
||||
{
|
||||
static SDL_bool inited = SDL_FALSE;
|
||||
#ifdef HAVE_FCITX
|
||||
@@ -142,7 +142,7 @@ void SDL_IME_UpdateTextRect(const SDL_Rect *rect)
|
||||
}
|
||||
}
|
||||
|
||||
void SDL_IME_PumpEvents()
|
||||
void SDL_IME_PumpEvents(void)
|
||||
{
|
||||
if (SDL_IME_PumpEvents_Real) {
|
||||
SDL_IME_PumpEvents_Real();
|
||||
|
||||
@@ -79,7 +79,7 @@ static SDL_bool realtime_portal_supported(DBusConnection *conn)
|
||||
"RTTimeUSecMax", DBUS_TYPE_INT64, &res);
|
||||
}
|
||||
|
||||
static void set_rtkit_interface()
|
||||
static void set_rtkit_interface(void)
|
||||
{
|
||||
SDL_DBusContext *dbus = SDL_DBus_GetContext();
|
||||
|
||||
@@ -108,7 +108,7 @@ static DBusConnection *get_rtkit_dbus_connection()
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void rtkit_initialize()
|
||||
static void rtkit_initialize(void)
|
||||
{
|
||||
DBusConnection *dbus_conn;
|
||||
|
||||
@@ -134,7 +134,7 @@ static void rtkit_initialize()
|
||||
}
|
||||
}
|
||||
|
||||
static SDL_bool rtkit_initialize_realtime_thread()
|
||||
static SDL_bool rtkit_initialize_realtime_thread(void)
|
||||
{
|
||||
// Following is an excerpt from rtkit README that outlines the requirements
|
||||
// a thread must meet before making rtkit requests:
|
||||
|
||||
@@ -449,7 +449,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");
|
||||
@@ -460,7 +460,7 @@ void SDL_WSCONS_Init()
|
||||
return;
|
||||
}
|
||||
|
||||
void SDL_WSCONS_Quit()
|
||||
void SDL_WSCONS_Quit(void)
|
||||
{
|
||||
int i = 0;
|
||||
SDL_WSCONS_input_data *input = NULL;
|
||||
@@ -921,7 +921,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++) {
|
||||
|
||||
Reference in New Issue
Block a user