Fixed some printf() compiler warnings in test/testplatform.c

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon 2011-08-23 02:57:36 -04:00
parent ae64fc82ae
commit 38d687d1e7

View file

@ -21,27 +21,27 @@ int TestTypes(SDL_bool verbose)
if ( badsize(sizeof(Uint8), 1) ) { if ( badsize(sizeof(Uint8), 1) ) {
if ( verbose ) if ( verbose )
printf("sizeof(Uint8) != 1, instead = %ul\n", printf("sizeof(Uint8) != 1, instead = %lu\n",
sizeof(Uint8)); (unsigned long) sizeof(Uint8));
++error; ++error;
} }
if ( badsize(sizeof(Uint16), 2) ) { if ( badsize(sizeof(Uint16), 2) ) {
if ( verbose ) if ( verbose )
printf("sizeof(Uint16) != 2, instead = %ul\n", printf("sizeof(Uint16) != 2, instead = %lu\n",
sizeof(Uint16)); (unsigned long) sizeof(Uint16));
++error; ++error;
} }
if ( badsize(sizeof(Uint32), 4) ) { if ( badsize(sizeof(Uint32), 4) ) {
if ( verbose ) if ( verbose )
printf("sizeof(Uint32) != 4, instead = %ul\n", printf("sizeof(Uint32) != 4, instead = %lu\n",
sizeof(Uint32)); (unsigned long) sizeof(Uint32));
++error; ++error;
} }
#ifdef SDL_HAS_64BIT_TYPE #ifdef SDL_HAS_64BIT_TYPE
if ( badsize(sizeof(Uint64), 8) ) { if ( badsize(sizeof(Uint64), 8) ) {
if ( verbose ) if ( verbose )
printf("sizeof(Uint64) != 8, instead = %ul\n", printf("sizeof(Uint64) != 8, instead = %lu\n",
sizeof(Uint64)); (unsigned long) sizeof(Uint64));
++error; ++error;
} }
#else #else
@ -113,7 +113,7 @@ int TestEndian(SDL_bool verbose)
#ifdef _MSC_VER #ifdef _MSC_VER
printf("Value 64 = 0x%I64X, swapped = 0x%I64X\n", value64, SDL_Swap64(value64)); printf("Value 64 = 0x%I64X, swapped = 0x%I64X\n", value64, SDL_Swap64(value64));
#else #else
printf("Value 64 = 0x%llX, swapped = 0x%llX\n", value64, SDL_Swap64(value64)); printf("Value 64 = 0x%llX, swapped = 0x%llX\n", (unsigned long long) value64, (unsigned long long) SDL_Swap64(value64));
#endif #endif
} }
if ( SDL_Swap64(value64) != swapped64 ) { if ( SDL_Swap64(value64) != swapped64 ) {