This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: Silence Win32 compiler warning.
authorKarl Williamson <public@khwilliamson.com>
Wed, 22 Jan 2014 05:17:20 +0000 (22:17 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 23 Jan 2014 18:00:44 +0000 (11:00 -0700)
This compiler is not smart enough to realize that overflow of a byte
can't occur here as the loop stops at 255.

locale.c

index 1c92721..a477c3b 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -249,7 +249,7 @@ Perl_new_ctype(pTHX_ const char *newctype)
        else if (isLOWER_LC((U8) i))
            PL_fold_locale[i] = toUPPER_LC((U8) i);
        else
-           PL_fold_locale[i] = i;
+           PL_fold_locale[i] = (U8) i;
     }
 
 #endif /* USE_LOCALE_CTYPE */