mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-08-29 18:11:38 +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:
@@ -103,7 +103,7 @@ static int SDLCALL SDL_SoftBlit(SDL_Surface *src, SDL_Rect *srcrect,
|
||||
#ifdef __MACOSX__
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
static SDL_bool SDL_UseAltivecPrefetch()
|
||||
static SDL_bool SDL_UseAltivecPrefetch(void)
|
||||
{
|
||||
const char key[] = "hw.l3cachesize";
|
||||
u_int64_t result = 0;
|
||||
|
||||
@@ -367,7 +367,7 @@ static void printf_128(const char *str, __m128i var)
|
||||
}
|
||||
#endif
|
||||
|
||||
static SDL_INLINE int hasSSE2()
|
||||
static SDL_INLINE int hasSSE2(void)
|
||||
{
|
||||
static int val = -1;
|
||||
if (val != -1) {
|
||||
|
||||
@@ -78,7 +78,7 @@ static SDL_Cursor *Android_WrapCursor(int custom_cursor, int system_cursor)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
static SDL_Cursor *Android_CreateDefaultCursor()
|
||||
static SDL_Cursor *Android_CreateDefaultCursor(void)
|
||||
{
|
||||
return Android_WrapCursor(0, SDL_SYSTEM_CURSOR_ARROW);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ static void Android_FreeCursor(SDL_Cursor *cursor)
|
||||
SDL_free(cursor);
|
||||
}
|
||||
|
||||
static SDL_Cursor *Android_CreateEmptyCursor()
|
||||
static SDL_Cursor *Android_CreateEmptyCursor(void)
|
||||
{
|
||||
if (!empty_cursor) {
|
||||
SDL_Surface *empty_surface = SDL_CreateRGBSurfaceWithFormat(0, 1, 1, 32, SDL_PIXELFORMAT_ARGB8888);
|
||||
@@ -129,7 +129,7 @@ static SDL_Cursor *Android_CreateEmptyCursor()
|
||||
return empty_cursor;
|
||||
}
|
||||
|
||||
static void Android_DestroyEmptyCursor()
|
||||
static void Android_DestroyEmptyCursor(void)
|
||||
{
|
||||
if (empty_cursor) {
|
||||
Android_FreeCursor(empty_cursor);
|
||||
|
||||
@@ -561,7 +561,7 @@ static void DirectFB_UnlockTexture(SDL_Renderer * renderer, SDL_Texture * textur
|
||||
}
|
||||
}
|
||||
|
||||
static void DirectFB_SetTextureScaleMode()
|
||||
static void DirectFB_SetTextureScaleMode(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ VideoBootStrap DUMMY_evdev_bootstrap = {
|
||||
NULL /* no ShowMessageBox implementation */
|
||||
};
|
||||
void SDL_EVDEV_Init(void);
|
||||
void SDL_EVDEV_Poll();
|
||||
void SDL_EVDEV_Poll(void);
|
||||
void SDL_EVDEV_Quit(void);
|
||||
static void DUMMY_EVDEV_Poll(_THIS)
|
||||
{
|
||||
|
||||
@@ -222,7 +222,7 @@ static int Emscripten_SetRelativeMouseMode(SDL_bool enabled)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void Emscripten_InitMouse()
|
||||
void Emscripten_InitMouse(void)
|
||||
{
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
@@ -236,7 +236,7 @@ void Emscripten_InitMouse()
|
||||
SDL_SetDefaultCursor(Emscripten_CreateDefaultCursor());
|
||||
}
|
||||
|
||||
void Emscripten_FiniMouse()
|
||||
void Emscripten_FiniMouse(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -30,17 +30,17 @@
|
||||
static SwkbdState sw_keyboard;
|
||||
const static size_t BUFFER_SIZE = 256;
|
||||
|
||||
void N3DS_SwkbInit()
|
||||
void N3DS_SwkbInit(void)
|
||||
{
|
||||
swkbdInit(&sw_keyboard, SWKBD_TYPE_NORMAL, 2, -1);
|
||||
}
|
||||
|
||||
void N3DS_SwkbPoll()
|
||||
void N3DS_SwkbPoll(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void N3DS_SwkbQuit()
|
||||
void N3DS_SwkbQuit(void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ static void RPI_Destroy(SDL_VideoDevice *device)
|
||||
SDL_free(device);
|
||||
}
|
||||
|
||||
static int RPI_GetRefreshRate()
|
||||
static int RPI_GetRefreshRate(void)
|
||||
{
|
||||
TV_DISPLAY_STATE_T tvstate;
|
||||
if (vc_tv_get_display_state(&tvstate) == 0) {
|
||||
|
||||
@@ -79,7 +79,7 @@ static void Wayland_VideoQuit(_THIS);
|
||||
|
||||
/* Find out what class name we should use
|
||||
* Based on src/video/x11/SDL_x11video.c */
|
||||
static char *get_classname()
|
||||
static char *get_classname(void)
|
||||
{
|
||||
/* !!! FIXME: this is probably wrong, albeit harmless in many common cases. From protocol spec:
|
||||
"The surface class identifies the general class of applications
|
||||
|
||||
@@ -330,7 +330,7 @@ static SDL_Scancode WindowsScanCodeToSDLScanCode(LPARAM lParam, WPARAM wParam)
|
||||
}
|
||||
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
static SDL_bool WIN_ShouldIgnoreFocusClick()
|
||||
static SDL_bool WIN_ShouldIgnoreFocusClick(void)
|
||||
{
|
||||
return !SDL_GetHintBoolean(SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH, SDL_FALSE);
|
||||
}
|
||||
@@ -1797,7 +1797,7 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
|
||||
#if !defined(__XBOXONE__) && !defined(__XBOXSERIES__)
|
||||
static void WIN_UpdateClipCursorForWindows()
|
||||
static void WIN_UpdateClipCursorForWindows(void)
|
||||
{
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
SDL_Window *window;
|
||||
@@ -1819,7 +1819,7 @@ static void WIN_UpdateClipCursorForWindows()
|
||||
}
|
||||
}
|
||||
|
||||
static void WIN_UpdateMouseCapture()
|
||||
static void WIN_UpdateMouseCapture(void)
|
||||
{
|
||||
SDL_Window *focusWindow = SDL_GetKeyboardFocus();
|
||||
|
||||
@@ -2093,7 +2093,7 @@ int SDL_RegisterApp(const char *name, Uint32 style, void *hInst)
|
||||
}
|
||||
|
||||
/* Unregisters the windowclass registered in SDL_RegisterApp above. */
|
||||
void SDL_UnregisterApp()
|
||||
void SDL_UnregisterApp(void)
|
||||
{
|
||||
WNDCLASSEX wcex;
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ void WIN_QuitKeyboard(_THIS)
|
||||
#endif /* !SDL_DISABLE_WINDOWS_IME */
|
||||
}
|
||||
|
||||
void WIN_ResetDeadKeys()
|
||||
void WIN_ResetDeadKeys(void)
|
||||
{
|
||||
/*
|
||||
if a deadkey has been typed, but not the next character (which the deadkey might modify),
|
||||
@@ -367,7 +367,7 @@ static void UILess_ReleaseSinks(SDL_VideoData *videodata);
|
||||
static void UILess_EnableUIUpdates(SDL_VideoData *videodata);
|
||||
static void UILess_DisableUIUpdates(SDL_VideoData *videodata);
|
||||
|
||||
static SDL_bool WIN_ShouldShowNativeUI()
|
||||
static SDL_bool WIN_ShouldShowNativeUI(void)
|
||||
{
|
||||
return SDL_GetHintBoolean(SDL_HINT_IME_SHOW_UI, SDL_FALSE);
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ static void WIN_SetLinearMouseScale(int mouse_speed)
|
||||
}
|
||||
}
|
||||
|
||||
void WIN_UpdateMouseSystemScale()
|
||||
void WIN_UpdateMouseSystemScale(void)
|
||||
{
|
||||
int mouse_speed;
|
||||
int params[3] = { 0, 0, 0 };
|
||||
|
||||
@@ -50,7 +50,7 @@ static int X11_VideoInit(_THIS);
|
||||
static void X11_VideoQuit(_THIS);
|
||||
|
||||
/* Find out what class name we should use */
|
||||
static char *get_classname()
|
||||
static char *get_classname(void)
|
||||
{
|
||||
char *spot;
|
||||
#if defined(__LINUX__) || defined(__FREEBSD__)
|
||||
|
||||
@@ -74,12 +74,12 @@ void X11_InitXfixes(_THIS)
|
||||
xfixes_initialized = 1;
|
||||
}
|
||||
|
||||
int X11_XfixesIsInitialized()
|
||||
int X11_XfixesIsInitialized(void)
|
||||
{
|
||||
return xfixes_initialized;
|
||||
}
|
||||
|
||||
int X11_GetXFixesSelectionNotifyEvent()
|
||||
int X11_GetXFixesSelectionNotifyEvent(void)
|
||||
{
|
||||
return xfixes_selection_notify_event;
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ void X11_Xinput2SelectTouch(_THIS, SDL_Window *window)
|
||||
#endif
|
||||
}
|
||||
|
||||
int X11_Xinput2IsInitialized()
|
||||
int X11_Xinput2IsInitialized(void)
|
||||
{
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2
|
||||
return xinput2_initialized;
|
||||
@@ -462,7 +462,7 @@ int X11_Xinput2IsInitialized()
|
||||
#endif
|
||||
}
|
||||
|
||||
int X11_Xinput2IsMultitouchSupported()
|
||||
int X11_Xinput2IsMultitouchSupported(void)
|
||||
{
|
||||
#ifdef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
|
||||
return xinput2_initialized && xinput2_multitouch_supported;
|
||||
|
||||
Reference in New Issue
Block a user