This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
printf warning
authorRobin Barker <RMBarker@cpan.org>
Thu, 29 Mar 2001 13:29:21 +0000 (14:29 +0100)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 29 Mar 2001 14:26:03 +0000 (14:26 +0000)
Message-Id: <200103291229.NAA03968@tempest.npl.co.uk>

p4raw-id: //depot/perl@9436

dump.c
ext/Data/Dumper/Dumper.xs
ext/Encode/Encode.xs
ext/Storable/Storable.xs
toke.c

diff --git a/dump.c b/dump.c
index 9d2a017..9010bc5 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -195,7 +195,7 @@ Perl_sv_peek(pTHX_ SV *sv)
        unref++;
     }
     else if (DEBUG_R_TEST && SvREFCNT(sv) > 1) {
-       Perl_sv_catpvf(aTHX_ t, "<%u>", SvREFCNT(sv));
+       Perl_sv_catpvf(aTHX_ t, "<%"UVuf">", (UV)SvREFCNT(sv));
     }
 
 
index bfa50d7..99cd099 100644 (file)
@@ -128,7 +128,7 @@ esc_q_utf8(pTHX_ SV* sv, register char *src, register STRLEN slen)
            r[j++] = '\\';
            r[j++] = 'x';
            r[j++] = '{';
-           j += sprintf(r + j, "%x", k);
+           j += sprintf(r + j, "%"UVxf, k);
            r[j++] = '}';
            dquote = TRUE;
        }
index 13ba704..a486939 100644 (file)
@@ -97,7 +97,7 @@ PerlIOEncode_pushed(PerlIO *f, const char *mode, SV *arg)
   {
    e->enc = Nullsv;
    errno  = EINVAL;
-   Perl_warner(aTHX_ WARN_IO, "Cannot find encoding \"%_\"", arg);
+   Perl_warner(aTHX_ WARN_IO, "Cannot find encoding \"%"SVf"\"", arg);
    return -1;
   }
  SvREFCNT_inc(e->enc);
index 647673e..dfb0f76 100644 (file)
@@ -3086,7 +3086,8 @@ static SV *retrieve_idx_blessed(stcxt_t *cxt, char *cname)
 
        sva = av_fetch(cxt->aclass, idx, FALSE);
        if (!sva)
-               CROAK(("Class name #%d should have been seen already", idx));
+               CROAK(("Class name #%"IVdf" should have been seen already",
+                       (IV)idx));
 
        class = SvPVX(*sva);    /* We know it's a PV, by construction */
 
@@ -3281,7 +3282,8 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
 
                sva = av_fetch(cxt->aclass, idx, FALSE);
                if (!sva)
-                       CROAK(("Class name #%d should have been seen already", idx));
+                   CROAK(("Class name #%"IVdf" should have been seen already", 
+                           (IV)idx));
 
                class = SvPVX(*sva);    /* We know it's a PV, by construction */
                TRACEME(("class ID %d => %s", idx, class));
@@ -3382,7 +3384,7 @@ static SV *retrieve_hook(stcxt_t *cxt, char *cname)
                        tag = ntohl(tag);
                        svh = av_fetch(cxt->aseen, tag, FALSE);
                        if (!svh)
-                               CROAK(("Object #%d should have been retrieved already", tag));
+                               CROAK(("Object #%"IVdf" should have been retrieved already", (IV)tag));
                        xsv = *svh;
                        ary[i] = SvREFCNT_inc(xsv);
                }
@@ -4532,7 +4534,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
                        I32 tagn;
                        svh = hv_fetch(cxt->hseen, (char *) &tag, sizeof(tag), FALSE);
                        if (!svh)
-                               CROAK(("Old tag 0x%x should have been mapped already", tag));
+                               CROAK(("Old tag 0x%"UVxf" should have been mapped already", (UV)tag));
                        tagn = SvIV(*svh);      /* Mapped tag number computed earlier below */
 
                        /*
@@ -4541,7 +4543,7 @@ static SV *retrieve(stcxt_t *cxt, char *cname)
 
                        svh = av_fetch(cxt->aseen, tagn, FALSE);
                        if (!svh)
-                               CROAK(("Object #%d should have been retrieved already", tagn));
+                               CROAK(("Object #%"IVdf" should have been retrieved already", (IV)tagn));
                        sv = *svh;
                        TRACEME(("has retrieved #%d at 0x%"UVxf, tagn, PTR2UV(sv)));
                        SvREFCNT_inc(sv);       /* One more reference to this same sv */
@@ -4582,7 +4584,8 @@ again:
                tag = ntohl(tag);
                svh = av_fetch(cxt->aseen, tag, FALSE);
                if (!svh)
-                       CROAK(("Object #%d should have been retrieved already", tag));
+                   CROAK(("Object #%"IVdf" should have been retrieved already",
+                           (IV)tag));
                sv = *svh;
                TRACEME(("had retrieved #%d at 0x%"UVxf, tag, PTR2UV(sv)));
                SvREFCNT_inc(sv);       /* One more reference to this same sv */
diff --git a/toke.c b/toke.c
index 00fe0b5..85ac7f2 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -187,7 +187,8 @@ S_tokereport(pTHX_ char *thing, char* s, I32 rv)
     SV *report;
     DEBUG_T({
         report = newSVpv(thing, 0);
-        Perl_sv_catpvf(aTHX_ report, ":line %i:%i:", CopLINE(PL_curcop), rv);
+        Perl_sv_catpvf(aTHX_ report, ":line %d:%"IVdf":", CopLINE(PL_curcop),
+               (IV)rv);
 
         if (s - PL_bufptr > 0)
             sv_catpvn(report, PL_bufptr, s - PL_bufptr);