diff options
author | David Mitchell <davem@iabyn.com> | 2013-11-29 17:44:12 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2013-11-29 17:44:12 +0000 |
commit | 68067e4e501e2ae1c0fb44558b6aa5c0a80a4143 (patch) | |
tree | a2432a1db7ff1c94fccdf6ba0fbb10f043ea9481 /locale.c | |
parent | 1534c6f5c3ecc70066a03d0b7df074bcd2e6f48c (diff) | |
download | perl-68067e4e501e2ae1c0fb44558b6aa5c0a80a4143.tar.gz |
fix -Wsign-compare in core
There were a few places that were doing
unsigned_var = cond ? signed_val : unsigned_val;
or similar. Fixed by suitable casts etc.
The four in utf8.c were fixed by assigning to an intermediate
unsigned var; this has the happy side-effect of collapsing
a large macro expansion, where toUPPER_LC() etc evaluate their arg
multiple times.
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -186,11 +186,11 @@ Perl_new_ctype(pTHX_ const char *newctype) { #ifdef USE_LOCALE_CTYPE dVAR; - int i; + UV i; PERL_ARGS_ASSERT_NEW_CTYPE; - for (i = 0; i < 256; i++) { + for (i = 0; i ; i++) { if (isUPPER_LC(i)) PL_fold_locale[i] = toLOWER_LC(i); else if (isLOWER_LC(i)) |