This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Adding missing HEKfARG() invocations
authorBrian Fraser <fraserbn@gmail.com>
Fri, 30 May 2014 23:13:26 +0000 (01:13 +0200)
committerBrian Fraser <fraserbn@gmail.com>
Thu, 12 Jun 2014 22:00:32 +0000 (00:00 +0200)
This silences a chunk of warnings under -Wformat

doio.c
gv.c
hv.c
util.c

diff --git a/doio.c b/doio.c
index cb4d007..762903e 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1488,8 +1488,8 @@ Perl_my_lstat_flags(pTHX_ const U32 flags)
            /* diag_listed_as: Use of -l on filehandle%s */
             Perl_warner(aTHX_ packWARN(WARN_IO),
                              "Use of -l on filehandle %"HEKf,
-                              GvENAME_HEK((const GV *)
-                                          (SvROK(sv) ? SvRV(sv) : sv)));
+                              HEKfARG(GvENAME_HEK((const GV *)
+                                          (SvROK(sv) ? SvRV(sv) : sv))));
     }
     file = SvPV_flags_const_nolen(sv, flags);
     sv_setpv(PL_statname,file);
diff --git a/gv.c b/gv.c
index d8cc012..b4ad523 100644 (file)
--- a/gv.c
+++ b/gv.c
@@ -2399,7 +2399,7 @@ Perl_gp_free(pTHX_ GV *gv)
          Somehow gp->gp_hv can end up pointing at freed garbage.  */
       if (hv && SvTYPE(hv) == SVt_PVHV) {
         const HEK *hvname_hek = HvNAME_HEK(hv);
-        DEBUG_o(Perl_deb(aTHX_ "gp_free clearing PL_stashcache for '%"HEKf"'\n", hvname_hek));
+        DEBUG_o(Perl_deb(aTHX_ "gp_free clearing PL_stashcache for '%"HEKf"'\n", HEKfARG(hvname_hek)));
         if (PL_stashcache && hvname_hek)
            (void)hv_deletehek(PL_stashcache, hvname_hek, G_DISCARD);
        SvREFCNT_dec(hv);
diff --git a/hv.c b/hv.c
index d51f95b..6e6adcb 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -1801,7 +1801,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
     if (PL_phase != PERL_PHASE_DESTRUCT && HvNAME(hv)) {
         if (PL_stashcache) {
             DEBUG_o(Perl_deb(aTHX_ "hv_undef_flags clearing PL_stashcache for '%"
-                             HEKf"'\n", HvNAME_HEK(hv)));
+                             HEKf"'\n", HEKfARG(HvNAME_HEK(hv))));
            (void)hv_deletehek(PL_stashcache, HvNAME_HEK(hv), G_DISCARD);
         }
        hv_name_set(hv, NULL, 0, 0);
@@ -1820,7 +1820,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
            mro_isa_changed_in(hv);
         if (PL_stashcache) {
             DEBUG_o(Perl_deb(aTHX_ "hv_undef_flags clearing PL_stashcache for effective name '%"
-                             HEKf"'\n", HvENAME_HEK(hv)));
+                             HEKf"'\n", HEKfARG(HvENAME_HEK(hv))));
            (void)hv_deletehek(PL_stashcache, HvENAME_HEK(hv), G_DISCARD);
         }
       }
@@ -1831,7 +1831,7 @@ Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags)
       if (flags & HV_NAME_SETALL ? !!HvAUX(hv)->xhv_name_u.xhvnameu_name : !!name) {
         if (name && PL_stashcache) {
             DEBUG_o(Perl_deb(aTHX_ "hv_undef_flags clearing PL_stashcache for name '%"
-                             HEKf"'\n", HvNAME_HEK(hv)));
+                             HEKf"'\n", HEKfARG(HvNAME_HEK(hv))));
            (void)hv_deletehek(PL_stashcache, HvNAME_HEK(hv), G_DISCARD);
         }
        hv_name_set(hv, NULL, 0, flags);
diff --git a/util.c b/util.c
index df8a02f..2df60f2 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3512,7 +3512,7 @@ Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have)
        if (name && HEK_LEN(name))
            Perl_warner(aTHX_ packWARN(WARN_IO),
                        "Filehandle %"HEKf" opened only for %sput",
-                       name, direction);
+                       HEKfARG(name), direction);
        else
            Perl_warner(aTHX_ packWARN(WARN_IO),
                        "Filehandle opened only for %sput", direction);