Fixed compiler warning

This commit is contained in:
Sam Lantinga 2017-10-12 14:44:54 -07:00
parent 5fc2017661
commit 7079195697

View File

@ -250,14 +250,14 @@ void SDLTest_LogAllocations()
total_allocated = 0; total_allocated = 0;
for (index = 0; index < SDL_arraysize(s_tracked_allocations); ++index) { for (index = 0; index < SDL_arraysize(s_tracked_allocations); ++index) {
for (entry = s_tracked_allocations[index]; entry; entry = entry->next) { 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(); ADD_LINE();
/* Start at stack index 1 to skip our tracking functions */ /* Start at stack index 1 to skip our tracking functions */
for (stack_index = 1; stack_index < SDL_arraysize(entry->stack); ++stack_index) { for (stack_index = 1; stack_index < SDL_arraysize(entry->stack); ++stack_index) {
if (!entry->stack[stack_index]) { if (!entry->stack[stack_index]) {
break; 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(); ADD_LINE();
} }
total_allocated += entry->size; total_allocated += entry->size;