Andy suggests this tweak to Dave's fix for MEM_WRAP_CHECK to shut up
Nicholas Clark [Sat, 2 Jul 2005 21:19:09 +0000 (21:19 +0000)]
a different compiler warnings. I guess we need a waterbed theory of
compiler warnings.

p4raw-id: //depot/perl@25055

handy.h

diff --git a/handy.h b/handy.h
index 911aca8..228490f 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -598,7 +598,7 @@ hopefully catches attempts to access uninitialized memory.
 
 #ifdef PERL_MALLOC_WRAP
 #define MEM_WRAP_CHECK(n,t) \
-       (void)((sizeof(t)>1?n:0)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(PL_memory_wrap),0):0)
+       (void)((sizeof(t)>1?n:1)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(PL_memory_wrap),0):0)
 #define MEM_WRAP_CHECK_1(n,t,a) \
        (void)((n)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a),0):0)
 #define MEM_WRAP_CHECK_2(n,t,a,b) \