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 /hv.c | |
parent | 51a1303ca5c496ad5fb0bb3bc37f2b3584e845b9 (diff) | |
download | perl-c60dbbc3880c0d4c4f81d95fb1d70b608f96a645.tar.gz |
Cast to signed before negating, to avoid compiler warnings
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -2081,7 +2081,7 @@ Perl_hv_name_set(pTHX_ HV *hv, const char *name, U32 len, U32 flags) spot = &iter->xhv_name_u.xhvnameu_name; } PERL_HASH(hash, name, len); - *spot = name ? share_hek(name, flags & SVf_UTF8 ? -len : len, hash) : NULL; + *spot = name ? share_hek(name, flags & SVf_UTF8 ? -(I32)len : (I32)len, hash) : NULL; } /* @@ -2149,7 +2149,7 @@ Perl_hv_ename_add(pTHX_ HV *hv, const char *name, U32 len, U32 flags) if (count < 0) aux->xhv_name_count--, count = -count; else aux->xhv_name_count++; Renew(aux->xhv_name_u.xhvnameu_names, count + 1, HEK *); - (aux->xhv_name_u.xhvnameu_names)[count] = share_hek(name, (flags & SVf_UTF8 ? -len : len), hash); + (aux->xhv_name_u.xhvnameu_names)[count] = share_hek(name, (flags & SVf_UTF8 ? -(I32)len : (I32)len), hash); } else { HEK *existing_name = aux->xhv_name_u.xhvnameu_name; @@ -2163,7 +2163,7 @@ Perl_hv_ename_add(pTHX_ HV *hv, const char *name, U32 len, U32 flags) Newx(aux->xhv_name_u.xhvnameu_names, 2, HEK *); aux->xhv_name_count = existing_name ? 2 : -2; *aux->xhv_name_u.xhvnameu_names = existing_name; - (aux->xhv_name_u.xhvnameu_names)[1] = share_hek(name, (flags & SVf_UTF8 ? -len : len), hash); + (aux->xhv_name_u.xhvnameu_names)[1] = share_hek(name, (flags & SVf_UTF8 ? -(I32)len : (I32)len), hash); } } |