[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48730] trunk/blender/intern/guardedalloc/ intern/mallocn.c: Fix for error from grumpy gcc in "over-warning" mode.

Bastien Montagne montagne29 at wanadoo.fr
Sun Jul 8 17:48:48 CEST 2012


Revision: 48730
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48730
Author:   mont29
Date:     2012-07-08 15:48:47 +0000 (Sun, 08 Jul 2012)
Log Message:
-----------
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...).

Modified Paths:
--------------
    trunk/blender/intern/guardedalloc/intern/mallocn.c

Modified: trunk/blender/intern/guardedalloc/intern/mallocn.c
===================================================================
--- trunk/blender/intern/guardedalloc/intern/mallocn.c	2012-07-08 15:15:14 UTC (rev 48729)
+++ trunk/blender/intern/guardedalloc/intern/mallocn.c	2012-07-08 15:48:47 UTC (rev 48730)
@@ -328,7 +328,7 @@
 	}
 	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 @@
 	}
 	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 @@
 		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);
 	}
 }




More information about the Bf-blender-cvs mailing list