summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Barker <RMBarker@cpan.org>2001-01-12 20:03:14 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-12 20:20:14 +0000
commitc6165ae66fdba59892a08427daaaedd87b3ee6ec (patch)
tree2aeff53b179ea421c7d3f7c667b0bc8251defa32
parent359cba2913c406cf1f52a3a0cd83af961daaaa24 (diff)
downloadperl-c6165ae66fdba59892a08427daaaedd87b3ee6ec.tar.gz
-Wformat
Message-Id: <200101122003.UAA29599@tempest.npl.co.uk> p4raw-id: //depot/perl@8425
-rw-r--r--ext/Encode/Encode.xs4
-rw-r--r--mg.c2
-rw-r--r--sv.c6
-rw-r--r--toke.c5
4 files changed, 9 insertions, 8 deletions
diff --git a/ext/Encode/Encode.xs b/ext/Encode/Encode.xs
index a7acd88e67..fce3ca430d 100644
--- a/ext/Encode/Encode.xs
+++ b/ext/Encode/Encode.xs
@@ -368,7 +368,7 @@ encode_method(pTHX_ encode_t *enc, encpage_t *dir, SV *src, int check)
{
STRLEN clen;
UV ch = utf8_to_uv(s+slen,(SvCUR(src)-slen),&clen,0);
- Perl_warner(aTHX_ WARN_UTF8, "\"\\x{%x}\" does not map to %s", ch, enc->name);
+ Perl_warner(aTHX_ WARN_UTF8, "\"\\x{%"UVxf"}\" does not map to %s", ch, enc->name);
/* FIXME: Skip over the character, copy in replacement and continue
* but that is messy so for now just fail.
*/
@@ -383,7 +383,7 @@ encode_method(pTHX_ encode_t *enc, encpage_t *dir, SV *src, int check)
{
/* UTF-8 is supposed to be "Universal" so should not happen */
Perl_croak(aTHX_ "%s '%.*s' does not map to UTF-8",
- enc->name, (SvCUR(src)-slen),s+slen);
+ enc->name, (int)(SvCUR(src)-slen),s+slen);
}
break;
diff --git a/mg.c b/mg.c
index a91d34bec3..b5cae86de6 100644
--- a/mg.c
+++ b/mg.c
@@ -415,7 +415,7 @@ Perl_magic_len(pTHX_ SV *sv, MAGIC *mg)
i = Perl_utf8_length(aTHX_ (U8*)s, (U8*)send);
}
if (i < 0)
- Perl_croak(aTHX_ "panic: magic_len: %d", i);
+ Perl_croak(aTHX_ "panic: magic_len: %"IVdf, (IV)i);
return i;
}
}
diff --git a/sv.c b/sv.c
index 21596fa8dd..2eb34f5cd4 100644
--- a/sv.c
+++ b/sv.c
@@ -1567,7 +1567,7 @@ STATIC int
S_sv_2inuv_non_preserve (pTHX_ register SV *sv, I32 numtype) {
NV nv = SvNVX(sv); /* Code simpler and had compiler problems if */
UV nv_as_uv = U_V(nv); /* these are not in simple variables. */
- DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2inuv_non '%s', IV=0x%"UVxf" NV=%g inttype=%X\n", SvPVX(sv), SvIVX(sv), nv, numtype));
+ DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2inuv_non '%s', IV=0x%"UVxf" NV=%g inttype=%"UVxf"\n", SvPVX(sv), SvIVX(sv), nv, (UV)numtype));
if (nv_as_uv <= (UV)IV_MAX) {
(void)SvIOKp_on(sv);
(void)SvNOKp_on(sv);
@@ -1625,7 +1625,7 @@ S_sv_2inuv_non_preserve (pTHX_ register SV *sv, I32 numtype) {
#else
/* We've just lost integer precision, nothing we could do. */
SvUVX(sv) = nv_as_uv;
- DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2niuv_non UV? '%s', UV=0x%"UVxf" NV=%g U_V(NV)=0x%"UVxf" inttype=%X\n", SvPVX(sv), SvIVX(sv), nv, nv_as_uv, numtype));
+ DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2niuv_non UV? '%s', UV=0x%"UVxf" NV=%g U_V(NV)=0x%"UVxf" inttype=%"UVxf"\n", SvPVX(sv), SvIVX(sv), nv, nv_as_uv, (UV)numtype));
/* UV and NV slots equally valid only if we have casting symmetry. */
if (numtype & IS_NUMBER_NOT_INT) {
SvIsUV_on(sv);
@@ -1648,7 +1648,7 @@ S_sv_2inuv_non_preserve (pTHX_ register SV *sv, I32 numtype) {
STATIC int
S_sv_2iuv_non_preserve (pTHX_ register SV *sv, I32 numtype)
{
- DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%g inttype=%X\n", SvPVX(sv), SvIVX(sv), SvNVX(sv), numtype));
+ DEBUG_c(PerlIO_printf(Perl_debug_log,"sv_2iuv_non '%s', IV=0x%"UVxf" NV=%g inttype=%"UVxf"\n", SvPVX(sv), SvIVX(sv), SvNVX(sv), (UV)numtype));
if (SvNVX(sv) < (NV)IV_MIN) {
(void)SvIOKp_on(sv);
(void)SvNOK_on(sv);
diff --git a/toke.c b/toke.c
index b82a7c4e9b..ea32115abd 100644
--- a/toke.c
+++ b/toke.c
@@ -2861,7 +2861,7 @@ Perl_yylex(pTHX)
if (ftst) {
PL_last_lop_op = ftst;
DEBUG_T( { PerlIO_printf(Perl_debug_log,
- "### Saw file test %c\n", ftst);
+ "### Saw file test %c\n", (int)ftst);
} )
FTST(ftst);
}
@@ -2869,7 +2869,8 @@ Perl_yylex(pTHX)
/* Assume it was a minus followed by a one-letter named
* subroutine call (or a -bareword), then. */
DEBUG_T( { PerlIO_printf(Perl_debug_log,
- "### %c looked like a file test but was not\n", ftst);
+ "### %c looked like a file test but was not\n",
+ (int)ftst);
} )
s -= 2;
}