mirror of
https://github.com/encounter/SDL.git
synced 2025-12-17 00:47:15 +00:00
Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes
felix Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like: /usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes] extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(); ^~~~~~ It seems there is a missing 'void' between the parentheses.
This commit is contained in:
@@ -41,7 +41,7 @@ extern "C" {
|
||||
static SDL_Scancode keymap[KEYMAP_SIZE];
|
||||
static int8 keystate[KEYMAP_SIZE];
|
||||
|
||||
void BE_InitOSKeymap() {
|
||||
void BE_InitOSKeymap(void) {
|
||||
for( uint i = 0; i < SDL_TABLESIZE(keymap); ++i ) {
|
||||
keymap[i] = SDL_SCANCODE_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ extern "C" {
|
||||
|
||||
#include "../../../include/SDL_keyboard.h"
|
||||
|
||||
extern void BE_InitOSKeymap();
|
||||
extern void BE_InitOSKeymap(void);
|
||||
extern SDL_Scancode BE_GetScancodeFromBeKey(int32 bkey);
|
||||
extern int8 BE_GetKeyState(int32 bkey);
|
||||
extern void BE_SetKeyState(int32 bkey, int8 state);
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
#if SDL_VIDEO_DRIVER_UIKIT
|
||||
|
||||
extern SDL_bool UIKit_ShowingMessageBox();
|
||||
extern SDL_bool UIKit_ShowingMessageBox(void);
|
||||
|
||||
extern int UIKit_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
static SDL_bool s_showingMessageBox = SDL_FALSE;
|
||||
|
||||
SDL_bool
|
||||
UIKit_ShowingMessageBox()
|
||||
UIKit_ShowingMessageBox(void)
|
||||
{
|
||||
return s_showingMessageBox;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ extern void UIKit_GL_DeleteContext(_THIS, SDL_GLContext context);
|
||||
extern void *UIKit_GL_GetProcAddress(_THIS, const char *proc);
|
||||
extern int UIKit_GL_LoadLibrary(_THIS, const char *path);
|
||||
|
||||
extern void UIKit_GL_RestoreCurrentContext();
|
||||
extern void UIKit_GL_RestoreCurrentContext(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@ UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
|
||||
}
|
||||
|
||||
void
|
||||
UIKit_GL_RestoreCurrentContext()
|
||||
UIKit_GL_RestoreCurrentContext(void)
|
||||
{
|
||||
@autoreleasepool {
|
||||
/* Some iOS system functionality (such as Dictation on the on-screen
|
||||
|
||||
@@ -105,7 +105,7 @@ WINRT_XAMLThreadMain(void * userdata)
|
||||
}
|
||||
|
||||
void
|
||||
WINRT_CycleXAMLThread()
|
||||
WINRT_CycleXAMLThread(void)
|
||||
{
|
||||
switch (_threadState) {
|
||||
case ThreadState_NotLaunched:
|
||||
|
||||
@@ -75,7 +75,7 @@ extern SDL_bool WINRT_IsScreenKeyboardShown(_THIS, SDL_Window *window);
|
||||
#endif // NTDDI_VERSION >= ...
|
||||
|
||||
/* XAML Thread Management */
|
||||
extern void WINRT_CycleXAMLThread();
|
||||
extern void WINRT_CycleXAMLThread(void);
|
||||
|
||||
#endif // ifdef __cplusplus_winrt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user