This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
S_gv_fetchmeth_internal fix STRLEN warning
authorNicolas R <atoomic@cpan.org>
Mon, 4 Nov 2019 19:03:54 +0000 (13:03 -0600)
committerNicolas R <nicolas@atoomic.org>
Mon, 4 Nov 2019 20:38:36 +0000 (13:38 -0700)
Fixes #17250

cast STRLEN to int

Fix warnings from recent change GH #17222
We could also consider casting it using '
x & PERL_INT_MAX'

gv.c

diff --git a/gv.c b/gv.c
index 53099e0..93be47e 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -816,10 +816,10 @@ S_gv_fetchmeth_internal(pTHX_ HV* stash, SV* meth, const char* name, STRLEN len,
                         "While trying to resolve method call %.*s->%.*s()"
                         " can not locate package \"%"SVf"\" yet it is mentioned in @%.*s::ISA"
                          " (perhaps you forgot to load \"%"SVf"\"?)",
-                         hvnamelen, hvname,
-                         len, name,
+                         (int) hvnamelen, hvname,
+                         (int) len, name,
                         SVfARG(linear_sv),
-                         hvnamelen, hvname,
+                         (int) hvnamelen, hvname,
                          SVfARG(linear_sv));
                 }
             }