From: Jarkko Hietaniemi Date: Fri, 28 Apr 2006 22:58:58 +0000 (+0300) Subject: reduce gcc -ansi -pedantic noise plus a suggestion X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=95b63a389ed86efed1a2fa9fd24931d56aac6070;p=p5sagit%2Fp5-mst-13.2.git reduce gcc -ansi -pedantic noise plus a suggestion Message-ID: <44527402.8000506@gmail.com> p4raw-id: //depot/perl@28008 --- diff --git a/doio.c b/doio.c index 2237f43..b49eec3 100644 --- a/doio.c +++ b/doio.c @@ -825,7 +825,7 @@ Perl_nextargv(pTHX_ register GV *gv) if (ckWARN_d(WARN_INPLACE)) Perl_warner(aTHX_ packWARN(WARN_INPLACE), "Can't rename %s to %"SVf": %s, skipping file", - PL_oldname, sv, Strerror(errno) ); + PL_oldname, (void*)sv, Strerror(errno)); do_close(gv,FALSE); continue; } @@ -2007,7 +2007,9 @@ Perl_do_ipcctl(pTHX_ I32 optype, SV **mark, SV **sp) char *a; I32 ret = -1; const I32 id = SvIVx(*++mark); +#ifdef Semctl const I32 n = (optype == OP_SEMCTL) ? SvIVx(*++mark) : 0; +#endif const I32 cmd = SvIVx(*++mark); SV * const astr = *++mark; STRLEN infosize = 0; diff --git a/gv.c b/gv.c index f7e4c75..9b68820 100644 --- a/gv.c +++ b/gv.c @@ -372,7 +372,7 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) if (!basestash) { if (ckWARN(WARN_MISC)) Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %"SVf" for @%s::ISA", - sv, hvname); + (void*)sv, hvname); continue; } gv = gv_fetchmeth(basestash, name, len, @@ -1824,7 +1824,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) if (amtp && amtp->fallback >= AMGfallYES) { DEBUG_o( Perl_deb(aTHX_ "%s", SvPVX_const(msg)) ); } else { - Perl_croak(aTHX_ "%"SVf, msg); + Perl_croak(aTHX_ "%"SVf, (void*)msg); } return NULL; } diff --git a/hv.c b/hv.c index cc2a384..a5336c6 100644 --- a/hv.c +++ b/hv.c @@ -1593,8 +1593,8 @@ Perl_hv_clear(pTHX_ HV *hv) if (HeVAL(entry) && SvREADONLY(HeVAL(entry))) { SV* const keysv = hv_iterkeysv(entry); Perl_croak(aTHX_ - "Attempt to delete readonly key '%"SVf"' from a restricted hash", - keysv); + "Attempt to delete readonly key '%"SVf"' from a restricted hash", + (void*)keysv); } SvREFCNT_dec(HeVAL(entry)); HeVAL(entry) = &PL_sv_placeholder; @@ -2691,7 +2691,7 @@ Perl_refcounted_he_new(pTHX_ struct refcounted_he *const parent, STRLEN key_len; const char *key_p = SvPV_const(key, key_len); STRLEN value_len = 0; - const char *value_p; + const char *value_p = NULL; char value_type; char flags; STRLEN key_offset; diff --git a/op.c b/op.c index 0b92b65..1e85254 100644 --- a/op.c +++ b/op.c @@ -224,7 +224,7 @@ S_no_bareword_allowed(pTHX_ const OP *o) return; /* various ok barewords are hidden in extra OP_NULL */ qerror(Perl_mess(aTHX_ "Bareword \"%"SVf"\" not allowed while \"strict subs\" in use", - cSVOPo_sv)); + (void*)cSVOPo_sv)); } /* "register" allocation */ @@ -4834,9 +4834,9 @@ Perl_cv_ckproto_len(pTHX_ const CV *cv, const GV *gv, const char *p, gv_efullname3(name = sv_newmortal(), gv, NULL); sv_setpv(msg, "Prototype mismatch:"); if (name) - Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, name); + Perl_sv_catpvf(aTHX_ msg, " sub %"SVf, (void*)name); if (SvPOK(cv)) - Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (const SV *)cv); + Perl_sv_catpvf(aTHX_ msg, " (%"SVf")", (void*)cv); else sv_catpvs(msg, ": none"); sv_catpvs(msg, " vs "); @@ -4844,7 +4844,7 @@ Perl_cv_ckproto_len(pTHX_ const CV *cv, const GV *gv, const char *p, Perl_sv_catpvf(aTHX_ msg, "(%.*s)", (int) len, p); else sv_catpvs(msg, "none"); - Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%"SVf, msg); + Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%"SVf, (void*)msg); } } @@ -5255,7 +5255,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block) else { /* force display of errors found but not reported */ sv_catpv(ERRSV, not_safe); - Perl_croak(aTHX_ "%"SVf, ERRSV); + Perl_croak(aTHX_ "%"SVf, (void*)ERRSV); } } } @@ -5597,7 +5597,7 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) CopLINE_set(PL_curcop, PL_copline); Perl_warner(aTHX_ packWARN(WARN_REDEFINE), o ? "Format %"SVf" redefined" - : "Format STDOUT redefined" ,cSVOPo->op_sv); + : "Format STDOUT redefined", (void*)cSVOPo->op_sv); CopLINE_set(PL_curcop, oldline); } SvREFCNT_dec(cv); @@ -6103,8 +6103,8 @@ Perl_ck_rvconst(pTHX_ register OP *o) } if (badthing) Perl_croak(aTHX_ - "Can't use bareword (\"%"SVf"\") as %s ref while \"strict refs\" in use", - kidsv, badthing); + "Can't use bareword (\"%"SVf"\") as %s ref while \"strict refs\" in use", + (void*)kidsv, badthing); } /* * This is a little tricky. We only want to add the symbol if we @@ -6262,7 +6262,7 @@ Perl_ck_fun(pTHX_ OP *o) if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Array @%"SVf" missing the @ in argument %"IVdf" of %s()", - ((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]); + (void*)((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]); #ifdef PERL_MAD op_getmad(kid,newop,'K'); #else @@ -6285,7 +6285,7 @@ Perl_ck_fun(pTHX_ OP *o) if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Hash %%%"SVf" missing the %% in argument %"IVdf" of %s()", - ((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]); + (void*)((SVOP*)kid)->op_sv, (IV)numargs, PL_op_desc[type]); #ifdef PERL_MAD op_getmad(kid,newop,'K'); #else @@ -7457,7 +7457,7 @@ Perl_ck_subr(pTHX_ OP *o) default: oops: Perl_croak(aTHX_ "Malformed prototype for %s: %"SVf, - gv_ename(namegv), cv); + gv_ename(namegv), (void*)cv); } } else @@ -7728,7 +7728,7 @@ Perl_peep(pTHX_ register OP *o) gv_efullname3(sv, gv, NULL); Perl_warner(aTHX_ packWARN(WARN_PROTOTYPE), "%"SVf"() called too early to check prototype", - sv); + (void*)sv); } } else if (o->op_next->op_type == OP_READLINE diff --git a/pad.c b/pad.c index cc74cb1..80e930e 100644 --- a/pad.c +++ b/pad.c @@ -1031,7 +1031,8 @@ Perl_pad_leavemy(pTHX) if (sv && sv != &PL_sv_undef && !SvFAKE(sv) && ckWARN_d(WARN_INTERNAL)) Perl_warner(aTHX_ packWARN(WARN_INTERNAL), - "%"SVf" never introduced", sv); + "%"SVf" never introduced", + (void*)sv); } } /* "Deintroduce" my variables that are leaving with this scope. */ diff --git a/perl.c b/perl.c index a818a7b..fc95e83 100644 --- a/perl.c +++ b/perl.c @@ -3265,8 +3265,8 @@ Perl_moreswitches(pTHX_ char *s) " DEVEL" STRINGIFY(PERL_PATCHNUM) #endif " built for %s", - vstringify(PL_patchlevel), - ARCHNAME)); + (void*)vstringify(PL_patchlevel), + ARCHNAME)); #else /* DGUX */ /* Adjust verbose output as in the perl that ships with the DG/UX OS from EMC */ PerlIO_printf(PerlIO_stdout(), @@ -3671,8 +3671,8 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch, SV *sv, Perl_sv_setpvf(aTHX_ cmd, "\ %s -ne%s%s%s %s | %"SVf" %s %"SVf" %s", - perl, quote, code, quote, scriptname, cpp, - cpp_discard_flag, sv, CPPMINUS); + perl, quote, code, quote, scriptname, (void*)cpp, + cpp_discard_flag, (void*)sv, CPPMINUS); PL_doextract = FALSE; @@ -5051,19 +5051,21 @@ S_incpush(pTHX_ const char *dir, bool addsubdirs, bool addoldvers, bool usesep, #endif /* .../version/archname if -d .../version/archname */ Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH PERL_ARCH_FMT, - libdir, + (void*)libdir, (int)PERL_REVISION, (int)PERL_VERSION, (int)PERL_SUBVERSION, ARCHNAME); subdir = S_incpush_if_exists(aTHX_ subdir); /* .../version if -d .../version */ - Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH, libdir, + Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT_PATH, + (void*)libdir, (int)PERL_REVISION, (int)PERL_VERSION, (int)PERL_SUBVERSION); subdir = S_incpush_if_exists(aTHX_ subdir); /* .../archname if -d .../archname */ - Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT, libdir, ARCHNAME); + Perl_sv_setpvf(aTHX_ subdir, "%"SVf PERL_ARCH_FMT, + (void*)libdir, ARCHNAME); subdir = S_incpush_if_exists(aTHX_ subdir); } @@ -5149,7 +5151,7 @@ Perl_call_list(pTHX_ I32 oldscope, AV *paramList) while (PL_scopestack_ix > oldscope) LEAVE; JMPENV_POP; - Perl_croak(aTHX_ "%"SVf"", atsv); + Perl_croak(aTHX_ "%"SVf"", (void*)atsv); } break; case 1: diff --git a/perl.h b/perl.h index 6640cf0..de0137d 100644 --- a/perl.h +++ b/perl.h @@ -343,7 +343,7 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER)); # endif #endif -#if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC) +#if defined(PERL_GCC_PEDANTIC) # if !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) # define PERL_GCC_BRACE_GROUPS_FORBIDDEN # endif diff --git a/perlio.c b/perlio.c index f65cc11..8d8a4ec 100644 --- a/perlio.c +++ b/perlio.c @@ -2301,7 +2301,9 @@ S_more_refcounted_fds(pTHX_ const int new_fd) { PL_perlio_fd_refcnt_size = new_max; PL_perlio_fd_refcnt = new_array; - PerlIO_debug("Zeroing %p, %d\n", new_array + old_max, new_max - old_max); + PerlIO_debug("Zeroing %p, %d\n", + (void*)(new_array + old_max), + new_max - old_max); Zero(new_array + old_max, new_max - old_max, int); } diff --git a/pp.c b/pp.c index e316c8e..cd218cc 100644 --- a/pp.c +++ b/pp.c @@ -4139,7 +4139,7 @@ PP(pp_splice) } if (diff < 0) { /* shrinking the area */ - SV **tmparyval; + SV **tmparyval = NULL; if (newlen) { Newx(tmparyval, newlen, SV*); /* so remember insertion */ Copy(MARK, tmparyval, newlen, SV*); diff --git a/pp_ctl.c b/pp_ctl.c index c62fbec..f88d401 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -1454,7 +1454,7 @@ Perl_qerror(pTHX_ SV *err) else if (PL_errors) sv_catsv(PL_errors, err); else - Perl_warn(aTHX_ "%"SVf, err); + Perl_warn(aTHX_ "%"SVf, (void*)err); ++PL_error_count; } @@ -2016,7 +2016,7 @@ PP(pp_return) /* Unassume the success we assumed earlier. */ SV * const nsv = cx->blk_eval.old_namesv; (void)hv_delete(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv), G_DISCARD); - DIE(aTHX_ "%"SVf" did not return a true value", nsv); + DIE(aTHX_ "%"SVf" did not return a true value", (void*)nsv); } break; case CXt_FORMAT: @@ -2324,7 +2324,7 @@ PP(pp_goto) goto retry; tmpstr = sv_newmortal(); gv_efullname3(tmpstr, gv, NULL); - DIE(aTHX_ "Goto undefined subroutine &%"SVf"",tmpstr); + DIE(aTHX_ "Goto undefined subroutine &%"SVf"",(void*)tmpstr); } DIE(aTHX_ "Goto undefined subroutine"); } @@ -3097,12 +3097,12 @@ PP(pp_require) if (cUNOP->op_first->op_type == OP_CONST && cUNOP->op_first->op_private & OPpCONST_NOVER) { if ( vcmp(sv,PL_patchlevel) < 0 ) DIE(aTHX_ "Perls since %"SVf" too modern--this is %"SVf", stopped", - vnormal(sv), vnormal(PL_patchlevel)); + (void*)vnormal(sv), (void*)vnormal(PL_patchlevel)); } else { if ( vcmp(sv,PL_patchlevel) > 0 ) DIE(aTHX_ "Perl %"SVf" required--this is only %"SVf", stopped", - vnormal(sv), vnormal(PL_patchlevel)); + (void*)vnormal(sv), (void*)vnormal(PL_patchlevel)); } RETPUSHYES; @@ -3584,7 +3584,7 @@ PP(pp_leaveeval) /* Unassume the success we assumed earlier. */ SV * const nsv = cx->blk_eval.old_namesv; (void)hv_delete(GvHVn(PL_incgv), SvPVX_const(nsv), SvCUR(nsv), G_DISCARD); - retop = Perl_die(aTHX_ "%"SVf" did not return a true value", nsv); + retop = Perl_die(aTHX_ "%"SVf" did not return a true value", (void*)nsv); /* die_where() did LEAVE, or we won't be here */ } else { @@ -4561,7 +4561,7 @@ S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen) int status = 0; SV *upstream; STRLEN got_len; - const char *got_p; + const char *got_p = NULL; const char *prune_from = NULL; bool read_from_cache = FALSE; STRLEN umaxlen; diff --git a/pp_hot.c b/pp_hot.c index 1e167a5..0e56e10 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -2781,7 +2781,7 @@ try_autoload: else { sub_name = sv_newmortal(); gv_efullname3(sub_name, gv, NULL); - DIE(aTHX_ "Undefined subroutine &%"SVf" called", sub_name); + DIE(aTHX_ "Undefined subroutine &%"SVf" called", (void*)sub_name); } } if (!cv) @@ -2921,7 +2921,7 @@ Perl_sub_crush_depth(pTHX_ CV *cv) SV* const tmpstr = sv_newmortal(); gv_efullname3(tmpstr, CvGV(cv), NULL); Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%"SVf"\"", - tmpstr); + (void*)tmpstr); } } @@ -2937,7 +2937,9 @@ PP(pp_aelem) SV *sv; if (SvROK(elemsv) && !SvGAMAGIC(elemsv) && ckWARN(WARN_MISC)) - Perl_warner(aTHX_ packWARN(WARN_MISC), "Use of reference \"%"SVf"\" as array index", elemsv); + Perl_warner(aTHX_ packWARN(WARN_MISC), + "Use of reference \"%"SVf"\" as array index", + (void*)elemsv); if (elem > 0) elem -= CopARYBASE_get(PL_curcop); if (SvTYPE(av) != SVt_PVAV) diff --git a/pp_pack.c b/pp_pack.c index 220b3e8..97e22fd 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -2833,7 +2833,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) if (datumtype == 'B') while (l++ < len) { if (utf8_source) { - UV val; + UV val = 0; NEXT_UNI_VAL(val, cur, str, end, utf8_flags); bits |= val & 1; } else bits |= *str++ & 1; @@ -2847,7 +2847,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) /* datumtype == 'b' */ while (l++ < len) { if (utf8_source) { - UV val; + UV val = 0; NEXT_UNI_VAL(val, cur, str, end, utf8_flags); if (val & 1) bits |= 0x80; } else if (*str++ & 1) @@ -2902,7 +2902,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) if (datumtype == 'H') while (l++ < len) { if (utf8_source) { - UV val; + UV val = 0; NEXT_UNI_VAL(val, cur, str, end, utf8_flags); if (val < 256 && isALPHA(val)) bits |= (val + 9) & 0xf; @@ -2921,7 +2921,7 @@ S_pack_rec(pTHX_ SV *cat, tempsym_t* symptr, SV **beglist, SV **endlist ) else while (l++ < len) { if (utf8_source) { - UV val; + UV val = 0; NEXT_UNI_VAL(val, cur, str, end, utf8_flags); if (val < 256 && isALPHA(val)) bits |= ((val + 9) & 0xf) << 4; diff --git a/pp_sort.c b/pp_sort.c index aa1fe80..ab383c1 100644 --- a/pp_sort.c +++ b/pp_sort.c @@ -1523,7 +1523,7 @@ PP(pp_sort) SV *tmpstr = sv_newmortal(); gv_efullname3(tmpstr, gv, NULL); DIE(aTHX_ "Undefined sort subroutine \"%"SVf"\" called", - tmpstr); + (void*)tmpstr); } else { DIE(aTHX_ "Undefined subroutine in sort"); diff --git a/pp_sys.c b/pp_sys.c index f8ba4e9..03d3b5f 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -453,7 +453,7 @@ PP(pp_warn) if (!tmps || !len) tmpsv = sv_2mortal(newSVpvs("Warning: something's wrong")); - Perl_warn(aTHX_ "%"SVf, tmpsv); + Perl_warn(aTHX_ "%"SVf, (void*)tmpsv); RETSETYES; } @@ -517,7 +517,7 @@ PP(pp_die) if (!tmps || !len) tmpsv = sv_2mortal(newSVpvs("Died")); - DIE(aTHX_ "%"SVf, tmpsv); + DIE(aTHX_ "%"SVf, (void*)tmpsv); } /* I/O. */ @@ -836,7 +836,7 @@ PP(pp_tie) stash = gv_stashsv(*MARK, FALSE); if (!stash || !(gv = gv_fetchmethod(stash, methname))) { DIE(aTHX_ "Can't locate object method \"%s\" via package \"%"SVf"\"", - methname, *MARK); + methname, (void*)*MARK); } ENTER; PUSHSTACKi(PERLSI_MAGIC); diff --git a/sv.c b/sv.c index 3189cd9..dab41e4 100644 --- a/sv.c +++ b/sv.c @@ -5349,7 +5349,7 @@ Perl_sv_len_utf8(pTHX_ register SV *sv) PL_utf8cache = 0; Perl_croak(aTHX_ "panic: sv_len_utf8 cache %"UVf " real %"UVf" for %"SVf, - (UV) ulen, (UV) real, sv); + (UV) ulen, (UV) real, (void*)sv); } } } @@ -5507,7 +5507,7 @@ S_sv_pos_u2b_cached(pTHX_ SV *sv, MAGIC **mgp, const U8 *const start, PL_utf8cache = 0; Perl_croak(aTHX_ "panic: sv_pos_u2b_cache cache %"UVf " real %"UVf" for %"SVf, - (UV) boffset, (UV) real_boffset, sv); + (UV) boffset, (UV) real_boffset, (void*)sv); } } boffset = real_boffset; @@ -5640,7 +5640,7 @@ S_utf8_mg_pos_cache_update(pTHX_ SV *sv, MAGIC **mgp, STRLEN byte, STRLEN utf8, SAVEI8(PL_utf8cache); PL_utf8cache = 0; Perl_croak(aTHX_ "panic: utf8_mg_pos_cache_update cache %"UVf - " real %"UVf" for %"SVf, (UV) utf8, (UV) realutf8, sv); + " real %"UVf" for %"SVf, (UV) utf8, (UV) realutf8, (void*)sv); } } @@ -5887,7 +5887,7 @@ Perl_sv_pos_b2u(pTHX_ register SV* sv, I32* offsetp) PL_utf8cache = 0; Perl_croak(aTHX_ "panic: sv_pos_b2u cache %"UVf " real %"UVf" for %"SVf, - (UV) len, (UV) real_len, sv); + (UV) len, (UV) real_len, (void*)sv); } } len = real_len; @@ -7370,7 +7370,7 @@ Perl_sv_2io(pTHX_ SV *sv) else io = 0; if (!io) - Perl_croak(aTHX_ "Bad filehandle: %"SVf, sv); + Perl_croak(aTHX_ "Bad filehandle: %"SVf, (void*)sv); break; } return io; @@ -7462,7 +7462,7 @@ Perl_sv_2cv(pTHX_ SV *sv, HV **st, GV **gvp, I32 lref) LEAVE; if (!GvCVu(gv)) Perl_croak(aTHX_ "Unable to create sub named \"%"SVf"\"", - sv); + (void*)sv); } return GvCVu(gv); } @@ -9324,7 +9324,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV (UV)c & 0xFF); } else sv_catpvs(msg, "end of string"); - Perl_warner(aTHX_ packWARN(WARN_PRINTF), "%"SVf, msg); /* yes, this is reentrant */ + Perl_warner(aTHX_ packWARN(WARN_PRINTF), "%"SVf, (void*)msg); /* yes, this is reentrant */ } /* output mangled stuff ... */ diff --git a/toke.c b/toke.c index 562a36c..6e80882 100644 --- a/toke.c +++ b/toke.c @@ -5482,7 +5482,7 @@ Perl_yylex(pTHX) PUTBACK; PerlIO_apply_layers(aTHX_ PL_rsfp, NULL, Perl_form(aTHX_ ":encoding(%"SVf")", - name)); + (void*)name)); FREETMPS; LEAVE; } @@ -6469,7 +6469,7 @@ Perl_yylex(pTHX) if (bad_proto && ckWARN(WARN_SYNTAX)) Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Illegal character in prototype for %"SVf" : %s", - PL_subname, d); + (void*)PL_subname, d); SvCUR_set(PL_lex_stuff, tmp); have_proto = TRUE; @@ -6498,7 +6498,7 @@ Perl_yylex(pTHX) if (!have_name) Perl_croak(aTHX_ "Illegal declaration of anonymous subroutine"); else if (*s != ';') - Perl_croak(aTHX_ "Illegal declaration of subroutine %"SVf, PL_subname); + Perl_croak(aTHX_ "Illegal declaration of subroutine %"SVf, (void*)PL_subname); } #ifdef PERL_MAD @@ -12257,13 +12257,13 @@ Perl_yyerror(pTHX_ const char *s) PL_multi_end = 0; } if (PL_in_eval & EVAL_WARNONLY && ckWARN_d(WARN_SYNTAX)) - Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%"SVf, msg); + Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "%"SVf, (void*)msg); else qerror(msg); if (PL_error_count >= 10) { if (PL_in_eval && SvCUR(ERRSV)) Perl_croak(aTHX_ "%"SVf"%s has too many errors.\n", - ERRSV, OutCopFILE(PL_curcop)); + (void*)ERRSV, OutCopFILE(PL_curcop)); else Perl_croak(aTHX_ "%s has too many errors.\n", OutCopFILE(PL_curcop)); diff --git a/universal.c b/universal.c index e94c602..21f2c54 100644 --- a/universal.c +++ b/universal.c @@ -111,7 +111,7 @@ S_isa_lookup(pTHX_ HV *stash, const char *name, HV* name_stash, if (ckWARN(WARN_MISC)) Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Can't locate package %"SVf" for @%s::ISA", - sv, hvname); + (void*)sv, hvname); continue; } if (isa_lookup(basestash, name, name_stash, len, level + 1)) { @@ -382,8 +382,11 @@ XS(XS_UNIVERSAL_VERSION) if ( vcmp( req, sv ) > 0 ) Perl_croak(aTHX_ "%s version %"SVf" (%"SVf") required--" - "this is only version %"SVf" (%"SVf")", HvNAME_get(pkg), - vnumify(req),vnormal(req),vnumify(sv),vnormal(sv)); + "this is only version %"SVf" (%"SVf")", HvNAME_get(pkg), + (void*)vnumify(req), + (void*)vnormal(req), + (void*)vnumify(sv), + (void*)vnormal(sv)); } if ( SvOK(sv) && sv_derived_from(sv, "version") ) { @@ -921,9 +924,11 @@ XS(XS_PerlIO_get_layers) else { if (namok && argok) XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf"(%"SVf")", - *namsvp, *argsvp)); + (void*)*namsvp, + (void*)*argsvp)); else if (namok) - XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf, *namsvp)); + XPUSHs(Perl_newSVpvf(aTHX_ "%"SVf, + (void*)*namsvp)); else XPUSHs(&PL_sv_undef); nitem++; diff --git a/utf8.c b/utf8.c index ecfbd69..83169a3 100644 --- a/utf8.c +++ b/utf8.c @@ -1615,7 +1615,7 @@ Perl_swash_init(pTHX_ const char* pkg, const char* name, SV *listsv, I32 minbits if (!SvROK(retval) || SvTYPE(SvRV(retval)) != SVt_PVHV) { if (SvPOK(retval)) Perl_croak(aTHX_ "Can't find Unicode property definition \"%"SVf"\"", - retval); + (void*)retval); Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref"); } return retval;