[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43515] trunk/blender/source/blender/ blenkernel/intern/DerivedMesh.c: Couple minor fixes for DM_debug_print().

Nicholas Bishop nicholasbishop at gmail.com
Thu Jan 19 05:00:28 CET 2012


Revision: 43515
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43515
Author:   nicholasbishop
Date:     2012-01-19 04:00:27 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Couple minor fixes for DM_debug_print().

Fix a gcc warning by not using the DM_debug_info string as the format
string, also free the string after printing.

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c

Modified: trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-19 04:00:03 UTC (rev 43514)
+++ trunk/blender/source/blender/blenkernel/intern/DerivedMesh.c	2012-01-19 04:00:27 UTC (rev 43515)
@@ -2383,8 +2383,9 @@
 void DM_debug_print(DerivedMesh *dm)
 {
 	char *str = DM_debug_info(dm);
-	printf(str);
+	printf("%s", str);
 	fflush(stdout);
+	MEM_freeN(str);
 }
 
 #endif /* NDEBUG */



More information about the Bf-blender-cvs mailing list