In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/5f7616bdb343ddcfb39747caa700dcc75c2e2b66?hp=5703b8ce86fe56bf7576cf157805335b074cc8a4>

- Log -----------------------------------------------------------------
commit 5f7616bdb343ddcfb39747caa700dcc75c2e2b66
Author: Karl Williamson <[email protected]>
Date:   Wed Nov 29 20:22:45 2017 -0700

    PATCH: [perl #132516] locale.c compiler warning
    
    This is a problem on Darwin due to a bug there.  MB_CUR_MAX, according
    to Tony Cook, is supposed to be an unsigned value according to the C99
    standard, and it is in Linux.  But Darwin declares it to be signed, even
    though the minimum value it can reach is +1.  Maybe other systems have
    the same defect.  But there is a simple fix, just cast it to unsigned.

-----------------------------------------------------------------------

Summary of changes:
 locale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/locale.c b/locale.c
index 79ecaa32e7..cb47662b7a 100644
--- a/locale.c
+++ b/locale.c
@@ -2939,7 +2939,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
          * Unicode code point.  Since UTF-8 is the only non-single byte
          * encoding we handle, we just say any such encoding is UTF-8, and if
          * turns out to be wrong, other things will fail */
-        is_utf8 = MB_CUR_MAX >= STRLENs(MAX_UNICODE_UTF8);
+        is_utf8 = (unsigned) MB_CUR_MAX >= STRLENs(MAX_UNICODE_UTF8);
 
         DEBUG_L(PerlIO_printf(Perl_debug_log,
                               "\tMB_CUR_MAX=%d; ?UTF8 locale=%d\n",

-- 
Perl5 Master Repository

Reply via email to