From 9b50316d41e10da7079284a39efe42f777afb179 Mon Sep 17 00:00:00 2001 From: Dave Mitchell Date: Fri, 1 Jul 2005 11:45:40 +0000 Subject: silence gcc 'comparison is always false' warning in MEM_WRAP_CHECK Only a partial fix: works where sizeof(type)==1; since we can never wraparound in that case, disarm the check p4raw-id: //depot/perl@25034 --- handy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'handy.h') diff --git a/handy.h b/handy.h index 09c8c79072..911aca801d 100644 --- 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)((n)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(PL_memory_wrap),0):0) + (void)((sizeof(t)>1?n:0)>((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) \ -- cgit v1.2.1