From: Robin Barker Date: Tue, 28 Jan 2003 13:27:17 +0000 (+0000) Subject: to silence compiler warning X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e3feee4e511b83331e79ac04619b8ea753bb64aa;p=p5sagit%2Fp5-mst-13.2.git to silence compiler warning Message-ID: <533D273D4014D411AB1D00062938C4D9040462CC@hotel.npl.co.uk> p4raw-id: //depot/perl@18697 --- diff --git a/ext/PerlIO/scalar/scalar.xs b/ext/PerlIO/scalar/scalar.xs index d92ef83..b26a238 100644 --- a/ext/PerlIO/scalar/scalar.xs +++ b/ext/PerlIO/scalar/scalar.xs @@ -216,7 +216,7 @@ PerlIOScalar_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers, IV n, if (!f) { f = PerlIO_allocate(aTHX); } - if (f = PerlIO_push(aTHX_ f, self, mode, arg)) { + if ( (f = PerlIO_push(aTHX_ f, self, mode, arg)) ) { PerlIOBase(f)->flags |= PERLIO_F_OPEN; } return f; diff --git a/ext/Storable/Storable.xs b/ext/Storable/Storable.xs index f1831b8..7cc610e 100644 --- a/ext/Storable/Storable.xs +++ b/ext/Storable/Storable.xs @@ -2427,14 +2427,14 @@ static int store_code(stcxt_t *cxt, CV *cv) text = POPs; len = SvLEN(text); - reallen = strlen(SvPV(text,PL_na)); + reallen = strlen(SvPV_nolen(text)); /* * Empty code references or XS functions are deparsed as * "(prototype) ;" or ";". */ - if (len == 0 || *(SvPV(text,PL_na)+reallen-1) == ';') { + if (len == 0 || *(SvPV_nolen(text)+reallen-1) == ';') { CROAK(("The result of B::Deparse::coderef2text was empty - maybe you're trying to serialize an XS function?\n")); } @@ -2444,13 +2444,13 @@ static int store_code(stcxt_t *cxt, CV *cv) PUTMARK(SX_CODE); TRACEME(("size = %d", len)); - TRACEME(("code = %s", SvPV(text,PL_na))); + TRACEME(("code = %s", SvPV_nolen(text))); /* * Now store the source code. */ - STORE_SCALAR(SvPV(text,PL_na), len); + STORE_SCALAR(SvPV_nolen(text), len); FREETMPS; LEAVE; @@ -4972,7 +4972,7 @@ static SV *retrieve_code(stcxt_t *cxt, char *cname) */ sub = newSVpvn("sub ", 4); - sv_catpv(sub, SvPV(text, PL_na)); /* XXX no sv_catsv! */ + sv_catpv(sub, SvPV_nolen(text)); /* XXX no sv_catsv! */ SvREFCNT_dec(text); /* @@ -5011,16 +5011,17 @@ static SV *retrieve_code(stcxt_t *cxt, char *cname) CROAK(("Unexpected return value from $Storable::Eval callback\n")); cv = POPs; if (SvTRUE(errsv)) { - CROAK(("code %s caused an error: %s", SvPV(sub, PL_na), SvPV(errsv, PL_na))); + CROAK(("code %s caused an error: %s", + SvPV_nolen(sub), SvPV_nolen(errsv))); } PUTBACK; } else { - cv = eval_pv(SvPV(sub, PL_na), TRUE); + cv = eval_pv(SvPV_nolen(sub), TRUE); } if (cv && SvROK(cv) && SvTYPE(SvRV(cv)) == SVt_PVCV) { sv = SvRV(cv); } else { - CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV(sub, PL_na))); + CROAK(("code %s did not evaluate to a subroutine reference\n", SvPV_nolen(sub))); } SvREFCNT_inc(sv); /* XXX seems to be necessary */ diff --git a/universal.c b/universal.c index f7b8691..2cb89f6 100644 --- a/universal.c +++ b/universal.c @@ -340,7 +340,8 @@ XS(XS_UNIVERSAL_VERSION) req = new_version(req); if ( vcmp( SvRV(req), SvRV(sv) ) > 0 ) - Perl_croak(aTHX_ "%s version %_ required--this is only version %_", + Perl_croak(aTHX_ + "%s version %"SVf" required--this is only version %"SVf, HvNAME(pkg), req, sv); } diff --git a/util.c b/util.c index 7664f60..6bdcf38 100644 --- a/util.c +++ b/util.c @@ -3949,14 +3949,14 @@ Perl_vstringify(pTHX_ SV *vs) return sv; } digit = SvIVX(*av_fetch((AV *)vs, 0, 0)); - Perl_sv_setpvf(aTHX_ sv,"%d",digit); + Perl_sv_setpvf(aTHX_ sv,"%"IVdf,(IV)digit); for ( i = 1 ; i <= len ; i++ ) { digit = SvIVX(*av_fetch((AV *)vs, i, 0)); if ( digit < 0 ) - Perl_sv_catpvf(aTHX_ sv,"_%d",-digit); + Perl_sv_catpvf(aTHX_ sv,"_%"IVdf,(IV)-digit); else - Perl_sv_catpvf(aTHX_ sv,".%d",digit); + Perl_sv_catpvf(aTHX_ sv,".%"IVdf,(IV)digit); } if ( len == 0 ) Perl_sv_catpv(aTHX_ sv,".0");