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...).

This commit is contained in:
Bastien Montagne 2012-07-08 15:48:47 +00:00
parent 76629c11ae
commit 4c6abb8105

@ -328,7 +328,7 @@ void *MEM_mallocN(size_t len, const char *str)
} }
mem_unlock_thread(); mem_unlock_thread();
print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", 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; return NULL;
} }
@ -354,7 +354,7 @@ void *MEM_callocN(size_t len, const char *str)
} }
mem_unlock_thread(); mem_unlock_thread();
print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", 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; return NULL;
} }
@ -387,7 +387,7 @@ void *MEM_mapallocN(size_t len, const char *str)
mem_unlock_thread(); mem_unlock_thread();
print_error("Mapalloc returns null, fallback to regular malloc: " print_error("Mapalloc returns null, fallback to regular malloc: "
"len=" SIZET_FORMAT " in %s, total %u\n", "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); return MEM_callocN(len, str);
} }
} }