This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Quiet warning in a DEBUG print
authorPeter Martini <PeterCMartini@GMail.com>
Wed, 10 Jul 2013 03:07:10 +0000 (23:07 -0400)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 10 Jul 2013 04:27:45 +0000 (21:27 -0700)
The variable type is STRLEN, and the format
code is expecting a UV, so just cast it to UV
to quiet a warning.

util.c

diff --git a/util.c b/util.c
index 2904500..ffd41b9 100644 (file)
--- a/util.c
+++ b/util.c
@@ -599,7 +599,7 @@ Perl_fbm_compile(pTHX_ SV *sv, U32 flags)
     if (flags & FBMcf_TAIL)
        SvTAIL_on(sv);
     DEBUG_r(PerlIO_printf(Perl_debug_log, "rarest char %c at %"UVuf"\n",
-                         s[rarest], rarest));
+                         s[rarest], (UV)rarest));
 }
 
 /* If SvTAIL(littlestr), it has a fake '\n' at end. */