Commit 707919569745cb7e2c6fee03c9e694354113df8a

Sam Lantinga 2017-10-12T14:44:54

Fixed compiler warning

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/test/SDL_test_memory.c b/src/test/SDL_test_memory.c
index 15395e8..69cb91e 100644
--- a/src/test/SDL_test_memory.c
+++ b/src/test/SDL_test_memory.c
@@ -250,14 +250,14 @@ void SDLTest_LogAllocations()
     total_allocated = 0;
     for (index = 0; index < SDL_arraysize(s_tracked_allocations); ++index) {
         for (entry = s_tracked_allocations[index]; entry; entry = entry->next) {
-            SDL_snprintf(line, sizeof(line), "Allocation %d: %lu bytes\n", count, entry->size);
+            SDL_snprintf(line, sizeof(line), "Allocation %d: %d bytes\n", count, (int)entry->size);
             ADD_LINE();
             /* Start at stack index 1 to skip our tracking functions */
             for (stack_index = 1; stack_index < SDL_arraysize(entry->stack); ++stack_index) {
                 if (!entry->stack[stack_index]) {
                     break;
                 }
-                SDL_snprintf(line, sizeof(line), "\t0x%llx: %s\n", entry->stack[stack_index], entry->stack_names[stack_index]);
+                SDL_snprintf(line, sizeof(line), "\t0x%"SDL_PRIX64": %s\n", entry->stack[stack_index], entry->stack_names[stack_index]);
                 ADD_LINE();
             }
             total_allocated += entry->size;