From 6e92b4109fea1a5ebf1c56c0ae479916d8237fec Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 12 Nov 2018 16:42:49 -0800 Subject: [PATCH] Fixed bug 4366 - Compile throws a warning on RPI (Raspbian Stretch) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit midwan When trying to compile on a Raspberry Pi 3, running Raspbian Stretch (fully updated), a warning appears: /home/pi/projects/SDL/src/test/SDL_test_memory.c: In function ‘SDL_TrackAllocation’: /home/pi/projects/SDL/src/test/SDL_test_memory.c:112:109: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘unw_word_t {aka unsigned int}’ [-Wformat=] snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset); --- src/test/SDL_test_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/SDL_test_memory.c b/src/test/SDL_test_memory.c index 6ce72f64d..c0994c98f 100644 --- a/src/test/SDL_test_memory.c +++ b/src/test/SDL_test_memory.c @@ -109,7 +109,7 @@ static void SDL_TrackAllocation(void *mem, size_t size) entry->stack[stack_index] = pc; if (unw_get_proc_name(&cursor, sym, sizeof(sym), &offset) == 0) { - snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, offset); + snprintf(entry->stack_names[stack_index], sizeof(entry->stack_names[stack_index]), "%s+0x%llx", sym, (unsigned long long)offset); } ++stack_index;