]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
We can print native word sized values sensibly now...
authorTom Hughes <tom@compton.nu>
Thu, 13 Oct 2005 15:29:39 +0000 (15:29 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 13 Oct 2005 15:29:39 +0000 (15:29 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4915

memcheck/mac_malloc_wrappers.c

index 875c062b85f27a392ded4f777bc991f88f02611e..0320024b288e78249baf6ddbc309b871e848b11e 100644 (file)
@@ -158,15 +158,8 @@ static Bool complain_about_silly_args(SizeT sizeB, Char* fn)
    // 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) {
-#if VG_WORDSIZE == 4
-      VG_(message)(Vg_UserMsg, "Warning: silly arg (%d) to %s()",
-                   (Int)sizeB, fn );
-#elif VG_WORDSIZE == 8
-      VG_(message)(Vg_UserMsg, "Warning: silly arg (%lld) to %s()",
-                   (Long)sizeB, fn );
-#else
-#  error Unexpected word size
-#endif
+      VG_(message)(Vg_UserMsg, "Warning: silly arg (%ld) to %s()",
+                   (SSizeT)sizeB, fn );
       return True;
    }
    return False;
@@ -175,15 +168,8 @@ static Bool complain_about_silly_args(SizeT sizeB, Char* fn)
 static Bool complain_about_silly_args2(SizeT n, SizeT sizeB)
 {
    if ((SSizeT)n < 0 || (SSizeT)sizeB < 0) {
-#if VG_WORDSIZE == 4
-      VG_(message)(Vg_UserMsg, "Warning: silly args (%d,%d) to calloc()",
-                   (Int)n, (Int)sizeB);
-#elif VG_WORDSIZE == 8
-      VG_(message)(Vg_UserMsg, "Warning: silly args (%lld,%lld) to calloc()",
-                   (Long)n, (Long)sizeB);
-#else
-#  error Unexpected word size
-#endif
+      VG_(message)(Vg_UserMsg, "Warning: silly args (%ld,%ld) to calloc()",
+                   (SSizeT)n, (SSizeT)sizeB);
       return True;
    }
    return False;