Fixed ISO C99 compatibility

SDL now builds with gcc 7.2 with the following command line options:
-Wall -pedantic-errors -Wno-deprecated-declarations -Wno-overlength-strings --std=c99
This commit is contained in:
Sam Lantinga
2018-01-30 18:08:34 -08:00
parent e1d85985b2
commit 90e72bf4e2
40 changed files with 176 additions and 196 deletions

View File

@@ -55,7 +55,7 @@ SDL_QuitInit_Internal(void)
struct sigaction action;
sigaction(SIGINT, NULL, &action);
#ifdef HAVE_SA_SIGACTION
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
if ( action.sa_handler == SIG_DFL && (__sighandler_t)action.sa_sigaction == SIG_DFL ) {
#else
if ( action.sa_handler == SIG_DFL ) {
#endif
@@ -65,7 +65,7 @@ SDL_QuitInit_Internal(void)
sigaction(SIGTERM, NULL, &action);
#ifdef HAVE_SA_SIGACTION
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
if ( action.sa_handler == SIG_DFL && (__sighandler_t)action.sa_sigaction == SIG_DFL ) {
#else
if ( action.sa_handler == SIG_DFL ) {
#endif