Fixed compiler warnings

This commit is contained in:
Sam Lantinga 2012-11-27 01:07:44 -08:00
parent 03e08a6a79
commit b165aa8c74
2 changed files with 8 additions and 6 deletions

View file

@ -96,7 +96,9 @@ const char *s_ControllerMappings [] =
}; };
static ControllerMapping_t *s_pSupportedControllers = NULL; static ControllerMapping_t *s_pSupportedControllers = NULL;
#ifdef SDL_JOYSTICK_DINPUT
static ControllerMapping_t *s_pXInputMapping = NULL; static ControllerMapping_t *s_pXInputMapping = NULL;
#endif
/* The SDL game controller structure */ /* The SDL game controller structure */
struct _SDL_GameController struct _SDL_GameController

View file

@ -62,13 +62,13 @@ static void rwops_testParam (void)
static int rwops_testGeneric( SDL_RWops *rw, int write ) static int rwops_testGeneric( SDL_RWops *rw, int write )
{ {
char buf[sizeof(hello_world)]; char buf[sizeof(hello_world)];
int i; Sint64 i;
/* Set to start. */ /* Set to start. */
i = SDL_RWseek( rw, 0, RW_SEEK_SET ); i = SDL_RWseek( rw, 0, RW_SEEK_SET );
if (SDL_ATvassert( i == 0, if (SDL_ATvassert( i == 0,
"Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d",
i, 0 )) (int)i, 0 ))
return 1; return 1;
/* Test write. */ /* Test write. */
@ -86,14 +86,14 @@ static int rwops_testGeneric( SDL_RWops *rw, int write )
i = SDL_RWseek( rw, 6, RW_SEEK_SET ); i = SDL_RWseek( rw, 6, RW_SEEK_SET );
if (SDL_ATvassert( i == 6, if (SDL_ATvassert( i == 6,
"Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d",
i, 0 )) (int)i, 0 ))
return 1; return 1;
/* Test seek. */ /* Test seek. */
i = SDL_RWseek( rw, 0, RW_SEEK_SET ); i = SDL_RWseek( rw, 0, RW_SEEK_SET );
if (SDL_ATvassert( i == 0, if (SDL_ATvassert( i == 0,
"Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d", "Seeking with SDL_RWseek (RW_SEEK_SET): got %d, expected %d",
i, 0 )) (int)i, 0 ))
return 1; return 1;
/* Test read. */ /* Test read. */
@ -108,12 +108,12 @@ static int rwops_testGeneric( SDL_RWops *rw, int write )
i = SDL_RWseek( rw, -4, RW_SEEK_CUR ); i = SDL_RWseek( rw, -4, RW_SEEK_CUR );
if (SDL_ATvassert( i == sizeof(hello_world)-5, if (SDL_ATvassert( i == sizeof(hello_world)-5,
"Seeking with SDL_RWseek (RW_SEEK_CUR): got %d, expected %d", "Seeking with SDL_RWseek (RW_SEEK_CUR): got %d, expected %d",
i, sizeof(hello_world)-5 )) (int)i, sizeof(hello_world)-5 ))
return 1; return 1;
i = SDL_RWseek( rw, -1, RW_SEEK_END ); i = SDL_RWseek( rw, -1, RW_SEEK_END );
if (SDL_ATvassert( i == sizeof(hello_world)-2, if (SDL_ATvassert( i == sizeof(hello_world)-2,
"Seeking with SDL_RWseek (RW_SEEK_END): got %d, expected %d", "Seeking with SDL_RWseek (RW_SEEK_END): got %d, expected %d",
i, sizeof(hello_world)-2 )) (int)i, sizeof(hello_world)-2 ))
return 1; return 1;
return 0; return 0;