This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Silence clang compiler warning
authorKarl Williamson <public@khwilliamson.com>
Thu, 1 Aug 2013 20:19:34 +0000 (14:19 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 1 Aug 2013 21:38:07 +0000 (15:38 -0600)
There is no pre-canned format for printing STRLEN variables.  This
commit casts to UV and uses %"UVuf".

regcomp.c

index eac3051..5735ff0 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8326,17 +8326,17 @@ Perl__invlist_dump(pTHX_ PerlIO *file, I32 level, const char * const indent, SV*
     while (invlist_iternext(invlist, &start, &end)) {
        if (end == UV_MAX) {
            Perl_dump_indent(aTHX_ level, file,
-                                            "%s[%d] 0x%04"UVXf" .. INFINITY\n",
-                                        indent, count, start);
+                                       "%s[%"UVuf"] 0x%04"UVXf" .. INFINITY\n",
+                                   indent, (UV)count, start);
        }
        else if (end != start) {
            Perl_dump_indent(aTHX_ level, file,
-                                         "%s[%d] 0x%04"UVXf" .. 0x%04"UVXf"\n",
-                                    indent, count, start,         end);
+                                    "%s[%"UVuf"] 0x%04"UVXf" .. 0x%04"UVXf"\n",
+                               indent, (UV)count, start,         end);
        }
        else {
-           Perl_dump_indent(aTHX_ level, file, "%s[%d] 0x%04"UVXf"\n",
-                                            indent, count, start);
+           Perl_dump_indent(aTHX_ level, file, "%s[%"UVuf"] 0x%04"UVXf"\n",
+                                            indent, (UV)count, start);
        }
         count += 2;
     }