Author: sewardj Date: 2007-11-09 11:33:02 +0000 (Fri, 09 Nov 2007) New Revision: 7111
Log: Don't print warnings about silly args to malloc/calloc in XML mode. Modified: trunk/memcheck/mc_malloc_wrappers.c Modified: trunk/memcheck/mc_malloc_wrappers.c =================================================================== --- trunk/memcheck/mc_malloc_wrappers.c 2007-11-08 02:29:36 UTC (rev 7110) +++ trunk/memcheck/mc_malloc_wrappers.c 2007-11-09 11:33:02 UTC (rev 7111) @@ -153,8 +153,9 @@ // assuming here that the size asked for is not greater than 2^31 bytes // (for 32-bit platforms) or 2^63 bytes (for 64-bit platforms). if ((SSizeT)sizeB < 0) { - VG_(message)(Vg_UserMsg, "Warning: silly arg (%ld) to %s()", - (SSizeT)sizeB, fn ); + if (!VG_(clo_xml)) + VG_(message)(Vg_UserMsg, "Warning: silly arg (%ld) to %s()", + (SSizeT)sizeB, fn ); return True; } return False; @@ -163,8 +164,10 @@ static Bool complain_about_silly_args2(SizeT n, SizeT sizeB) { if ((SSizeT)n < 0 || (SSizeT)sizeB < 0) { - VG_(message)(Vg_UserMsg, "Warning: silly args (%ld,%ld) to calloc()", - (SSizeT)n, (SSizeT)sizeB); + if (!VG_(clo_xml)) + VG_(message)(Vg_UserMsg, + "Warning: silly args (%ld,%ld) to calloc()", + (SSizeT)n, (SSizeT)sizeB); return True; } return False; ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Valgrind-developers mailing list Valgrind-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-developers