summaryrefslogtreecommitdiff
path: root/locale.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-11-29 17:44:12 +0000
committerDavid Mitchell <davem@iabyn.com>2013-11-29 17:44:12 +0000
commit68067e4e501e2ae1c0fb44558b6aa5c0a80a4143 (patch)
treea2432a1db7ff1c94fccdf6ba0fbb10f043ea9481 /locale.c
parent1534c6f5c3ecc70066a03d0b7df074bcd2e6f48c (diff)
downloadperl-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/locale.c b/locale.c
index 7ec3463e84..62841993bc 100644
--- a/locale.c
+++ b/locale.c
@@ -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))