This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quell compilation warning in regcomp.c
authorAaron Crane <arc@cpan.org>
Fri, 4 Sep 2015 05:47:22 +0000 (07:47 +0200)
committerAaron Crane <arc@cpan.org>
Fri, 4 Sep 2015 05:49:56 +0000 (07:49 +0200)
This warning affected platforms where U32 is a C long rather than an int. It
was introduced in e4105e89df44935f2a4363ac725ff11e07de35d8.

regcomp.c

index a954a79..efc6a4b 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -17005,11 +17005,11 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
         U32 lo = ARG1(o), hi = ARG2(o);
        if (OP(o) == CURLYM || OP(o) == CURLYN || OP(o) == CURLYX)
            Perl_sv_catpvf(aTHX_ sv, "[%d]", o->flags); /* Parenth number */
-        Perl_sv_catpvf(aTHX_ sv, "{%d,", lo);
+        Perl_sv_catpvf(aTHX_ sv, "{%u,", (unsigned) lo);
         if (hi == REG_INFTY)
             sv_catpvs(sv, "INFTY");
         else
-            Perl_sv_catpvf(aTHX_ sv, "%d", hi);
+            Perl_sv_catpvf(aTHX_ sv, "%u", (unsigned) hi);
         sv_catpvs(sv, "}");
     }
     else if (k == WHILEM && o->flags)                  /* Ordinal/of */