diff options
author | Brian Fraser <fraserbn@gmail.com> | 2011-10-06 22:17:33 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-10-06 22:17:33 -0700 |
commit | c60dbbc3880c0d4c4f81d95fb1d70b608f96a645 (patch) | |
tree | 8c27ae687782db5088cf0fd5d43f2b88d82b20ef /gv.c | |
parent | 51a1303ca5c496ad5fb0bb3bc37f2b3584e845b9 (diff) | |
download | perl-c60dbbc3880c0d4c4f81d95fb1d70b608f96a645.tar.gz |
Cast to signed before negating, to avoid compiler warnings
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -667,7 +667,7 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, topgen_cmp = HvMROMETA(stash)->cache_gen + PL_sub_generation; /* check locally for a real method or a cache entry */ - gvp = (GV**)hv_fetch(stash, name, is_utf8 ? -len : len, create); + gvp = (GV**)hv_fetch(stash, name, is_utf8 ? -(I32)len : (I32)len, create); if(gvp) { topgv = *gvp; have_gv: @@ -726,7 +726,7 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level, assert(cstash); - gvp = (GV**)hv_fetch(cstash, name, is_utf8 ? -len : len, 0); + gvp = (GV**)hv_fetch(cstash, name, is_utf8 ? -(I32)len : (I32)len, 0); if (!gvp) { if (len > 1 && HvNAMELEN_get(cstash) == 4) { const char *hvname = HvNAME(cstash); assert(hvname); @@ -864,7 +864,8 @@ Perl_gv_fetchmeth_pvn_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I3 /* Have an autoload */ if (level < 0) /* Cannot do without a stub */ gv_fetchmeth_pvn(stash, name, len, 0, flags); - gvp = (GV**)hv_fetch(stash, name, (flags & SVf_UTF8) ? -len : len, (level >= 0)); + gvp = (GV**)hv_fetch(stash, name, + (flags & SVf_UTF8) ? -(I32)len : (I32)len, (level >= 0)); if (!gvp) return NULL; return *gvp; @@ -2947,7 +2948,7 @@ Perl_gv_name_set(pTHX_ GV *gv, const char *name, U32 len, U32 flags) } PERL_HASH(hash, name, len); - GvNAME_HEK(gv) = share_hek(name, (flags & SVf_UTF8 ? -len : len), hash); + GvNAME_HEK(gv) = share_hek(name, (flags & SVf_UTF8 ? -(I32)len : (I32)len), hash); } /* |