This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
silence warning in toke.c charnames support
authorYves Orton <demerphq@gmail.com>
Fri, 26 Oct 2012 09:41:10 +0000 (11:41 +0200)
committerYves Orton <demerphq@gmail.com>
Sat, 27 Oct 2012 11:54:40 +0000 (13:54 +0200)
In a C sprintf the expectation is that * parameters are type "int".

toke.c

diff --git a/toke.c b/toke.c
index 8500573..45468b3 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -8935,7 +8935,7 @@ S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen,
             if (strEQ(key,"charnames")) {
                 msg = Perl_newSVpvf(aTHX_
                         /* The +3 is for '\N{'; -4 for that, plus '}' */
-                        "Unknown charname '%.*s'", typelen - 4, type + 3);
+                        "Unknown charname '%.*s'", (int)typelen - 4, type + 3);
             }
             else {
                 msg = Perl_newSVpvf(aTHX_ "Constant(%s): %s%s%s",