summaryrefslogtreecommitdiff
path: root/handy.h
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2005-07-01 11:45:40 +0000
committerDave Mitchell <davem@fdisolutions.com>2005-07-01 11:45:40 +0000
commit9b50316d41e10da7079284a39efe42f777afb179 (patch)
treea128507798452150f89462eaa4ff9a2ba360ec0b /handy.h
parenta51a97d86a8e028ada154e7e70624ca9fe055d4c (diff)
downloadperl-9b50316d41e10da7079284a39efe42f777afb179.tar.gz
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
Diffstat (limited to 'handy.h')
-rw-r--r--handy.h2
1 files changed, 1 insertions, 1 deletions
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) \