comparison test/testplatform.c @ 3687:8e5186a99af4

Fixed compile warning on 64-bit Mac OS X
author Sam Lantinga <slouken@libsdl.org>
date Thu, 21 Jan 2010 07:22:11 +0000
parents cc564f08884f
children 87f452305db4
comparison
equal deleted inserted replaced
3686:d87db9cf6a31 3687:8e5186a99af4
22 { 22 {
23 int error = 0; 23 int error = 0;
24 24
25 if (badsize(sizeof(Uint8), 1)) { 25 if (badsize(sizeof(Uint8), 1)) {
26 if (verbose) 26 if (verbose)
27 printf("sizeof(Uint8) != 1, instead = %u\n", sizeof(Uint8)); 27 printf("sizeof(Uint8) != 1, instead = %u\n",
28 (unsigned int)sizeof(Uint8));
28 ++error; 29 ++error;
29 } 30 }
30 if (badsize(sizeof(Uint16), 2)) { 31 if (badsize(sizeof(Uint16), 2)) {
31 if (verbose) 32 if (verbose)
32 printf("sizeof(Uint16) != 2, instead = %u\n", sizeof(Uint16)); 33 printf("sizeof(Uint16) != 2, instead = %u\n",
34 (unsigned int)sizeof(Uint16));
33 ++error; 35 ++error;
34 } 36 }
35 if (badsize(sizeof(Uint32), 4)) { 37 if (badsize(sizeof(Uint32), 4)) {
36 if (verbose) 38 if (verbose)
37 printf("sizeof(Uint32) != 4, instead = %u\n", sizeof(Uint32)); 39 printf("sizeof(Uint32) != 4, instead = %u\n",
40 (unsigned int)sizeof(Uint32));
38 ++error; 41 ++error;
39 } 42 }
40 #ifdef SDL_HAS_64BIT_TYPE 43 #ifdef SDL_HAS_64BIT_TYPE
41 if (badsize(sizeof(Uint64), 8)) { 44 if (badsize(sizeof(Uint64), 8)) {
42 if (verbose) 45 if (verbose)
43 printf("sizeof(Uint64) != 8, instead = %u\n", sizeof(Uint64)); 46 printf("sizeof(Uint64) != 8, instead = %u\n",
47 (unsigned int)sizeof(Uint64));
44 ++error; 48 ++error;
45 } 49 }
46 #else 50 #else
47 if (verbose) { 51 if (verbose) {
48 printf("WARNING: No 64-bit datatype on this platform\n"); 52 printf("WARNING: No 64-bit datatype on this platform\n");