From 4c6abb8105c5c2747c182ef64dbc66dd990cbbe0 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 8 Jul 2012 15:48:47 +0000 Subject: [PATCH] Fix for error from grumpy gcc in "over-warning" mode. Must explicitely cast uintptr_t to unsigned int (othe solution would be to use PRIuPTR macro from inttypes.h, but that would probably causes some problems with windows...). --- intern/guardedalloc/intern/mallocn.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c index 2c691fbc14a..9ba8c0f3d58 100644 --- a/intern/guardedalloc/intern/mallocn.c +++ b/intern/guardedalloc/intern/mallocn.c @@ -328,7 +328,7 @@ void *MEM_mallocN(size_t len, const char *str) } mem_unlock_thread(); print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", - SIZET_ARG(len), str, mem_in_use); + SIZET_ARG(len), str, (unsigned int) mem_in_use); return NULL; } @@ -354,7 +354,7 @@ void *MEM_callocN(size_t len, const char *str) } mem_unlock_thread(); print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", - SIZET_ARG(len), str, mem_in_use); + SIZET_ARG(len), str, (unsigned int) mem_in_use); return NULL; } @@ -387,7 +387,7 @@ void *MEM_mapallocN(size_t len, const char *str) mem_unlock_thread(); print_error("Mapalloc returns null, fallback to regular malloc: " "len=" SIZET_FORMAT " in %s, total %u\n", - SIZET_ARG(len), str, mmap_in_use); + SIZET_ARG(len), str, (unsigned int) mmap_in_use); return MEM_callocN(len, str); } }