|
From: <sv...@va...> - 2005-08-24 23:04:29
|
Author: dirk
Date: 2005-08-25 00:04:25 +0100 (Thu, 25 Aug 2005)
New Revision: 4502
Log:
svn merge 4476: fix 111102
Modified:
branches/VALGRIND_3_0_BRANCH/memcheck/mac_malloc_wrappers.c
Modified: branches/VALGRIND_3_0_BRANCH/memcheck/mac_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/VALGRIND_3_0_BRANCH/memcheck/mac_malloc_wrappers.c 2005-08-2=
4 23:03:44 UTC (rev 4501)
+++ branches/VALGRIND_3_0_BRANCH/memcheck/mac_malloc_wrappers.c 2005-08-2=
4 23:04:25 UTC (rev 4502)
@@ -174,7 +174,15 @@
// assuming here that the size asked for is not greater than 2^31 byt=
es
// (for 32-bit platforms) or 2^63 bytes (for 64-bit platforms).
if ((SSizeT)sizeB < 0) {
- VG_(message)(Vg_UserMsg, "Warning: silly arg (%d) to %s()", sizeB,=
fn );
+#if VG_WORDSIZE =3D=3D 4
+ VG_(message)(Vg_UserMsg, "Warning: silly arg (%d) to %s()",
+ (Int)sizeB, fn );
+#elif VG_WORDSIZE =3D=3D 8
+ VG_(message)(Vg_UserMsg, "Warning: silly arg (%lld) to %s()",
+ (Long)sizeB, fn );
+#else
+# error Unexpected word size
+#endif
return True;
}
return False;
@@ -183,8 +191,15 @@
static Bool complain_about_silly_args2(SizeT n, SizeT sizeB)
{
if ((SSizeT)n < 0 || (SSizeT)sizeB < 0) {
+#if VG_WORDSIZE =3D=3D 4
VG_(message)(Vg_UserMsg, "Warning: silly args (%d,%d) to calloc()"=
,
- n, sizeB);
+ (Int)n, (Int)sizeB);
+#elif VG_WORDSIZE =3D=3D 8
+ VG_(message)(Vg_UserMsg, "Warning: silly args (%lld,%lld) to callo=
c()",
+ (Long)n, (Long)sizeB);
+#else
+# error Unexpected word size
+#endif
return True;
}
return False;
|