This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
g++ cleanups.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 28 May 2014 15:09:23 +0000 (11:09 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 28 May 2014 15:10:46 +0000 (11:10 -0400)
regcomp.c:11083: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

locale.c:1113: warning: comparison between signed and unsigned integer expressions

locale.c
regcomp.c

index 6e8728c..66524e6 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -1109,7 +1109,7 @@ S_is_cur_LC_category_utf8(pTHX_ int category)
             (void) mbtowc(&wc, NULL, 0);    /* Reset any shift state */
             GCC_DIAG_RESTORE;
             errno = 0;
-            if (mbtowc(&wc, HYPHEN_UTF8, strlen(HYPHEN_UTF8))
+            if ((size_t)mbtowc(&wc, HYPHEN_UTF8, strlen(HYPHEN_UTF8))
                                                         != strlen(HYPHEN_UTF8)
                 || wc != (wchar_t) 0x2010)
             {
index 5cc4105..b18149f 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11080,7 +11080,7 @@ S_backref_value(char *p)
 {
     char *q = p;
 
-    for (;isDIGIT(*q); q++); /* calculate length of num */
+    for (;isDIGIT(*q); q++) {} /* calculate length of num */
     if (q - p == 0 || q - p > 9)
         return I32_MAX;
     return atoi(p);