summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-11-06 19:59:59 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-06 19:59:59 +0000
commitfaccc32bb7c59a53878549eecfb9041c1d7a78f3 (patch)
treee2014b6ae0fc0ec6c167f25d57eb3e57e77ef46b /ext
parent57b0da177c2b783cf692c833d7155067adca9d4b (diff)
downloadperl-faccc32bb7c59a53878549eecfb9041c1d7a78f3.tar.gz
More printf miscasts flushed out.
p4raw-id: //depot/cfgperl@4525
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs4
-rw-r--r--ext/Data/Dumper/Dumper.xs2
2 files changed, 3 insertions, 3 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 224354c850..731ae950dd 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -491,10 +491,10 @@ hash(sv)
char *s;
STRLEN len;
U32 hash = 0;
- char hexhash[19]; /* must fit "0xffffffff" plus trailing \0 */
+ char hexhash[19]; /* must fit "0xffffffffffffffff" plus trailing \0 */
s = SvPV(sv, len);
PERL_HASH(hash, s, len);
- sprintf(hexhash, "0x%x", hash);
+ sprintf(hexhash, "0x%"UVxf, (UV)hash);
ST(0) = sv_2mortal(newSVpv(hexhash, 0));
#define cast_I32(foo) (I32)foo
diff --git a/ext/Data/Dumper/Dumper.xs b/ext/Data/Dumper/Dumper.xs
index 6f548bbaa7..125375facc 100644
--- a/ext/Data/Dumper/Dumper.xs
+++ b/ext/Data/Dumper/Dumper.xs
@@ -839,7 +839,7 @@ Data_Dumper_Dumpxs(href, ...)
STRLEN nchars = 0;
sv_setpvn(name, "$", 1);
sv_catsv(name, varname);
- (void) sprintf(tmpbuf, "%d", i+1);
+ (void) sprintf(tmpbuf, "%"IVdf, (IV)(i+1));
nchars = strlen(tmpbuf);
sv_catpvn(name, tmpbuf, nchars);
}