From: Dave Mitchell Date: Sun, 10 Jul 2005 11:15:32 +0000 (+0000) Subject: extend MEM_WRAP_CHECK supress warning hack to MEM_WRAP_CHECK_* X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed87b6edd2c457984b92b013316ae3ed72b4e8d3;p=p5sagit%2Fp5-mst-13.2.git extend MEM_WRAP_CHECK supress warning hack to MEM_WRAP_CHECK_* p4raw-id: //depot/perl@25103 --- diff --git a/handy.h b/handy.h index d0366c3..a110080 100644 --- a/handy.h +++ b/handy.h @@ -603,11 +603,11 @@ hopefully catches attempts to access uninitialized memory. #ifdef PERL_MALLOC_WRAP #define MEM_WRAP_CHECK(n,t) \ - (void)((sizeof(t)>1?n:1)>((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) + (void)((sizeof(t)>1?(n):1)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a),0):0) #define MEM_WRAP_CHECK_2(n,t,a,b) \ - (void)((n)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a,b),0):0) + (void)((sizeof(t)>1?(n):1)>((MEM_SIZE)~0)/sizeof(t)?(Perl_croak_nocontext(a,b),0):0) #define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t), #define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > (MEM_SIZE)~0 - 2 * PERL_STRLEN_ROUNDUP_QUANTUM) ? (Perl_croak_nocontext(PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))