Change 29964 by [EMAIL PROTECTED] on 2007/01/24 23:53:28
Integrate:
[ 28008]
Subject: [PATCH] reduce gcc -ansi -pedantic noise plus a suggestion
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Fri, 28 Apr 2006 22:58:58 +0300
Message-ID: <[EMAIL PROTECTED]>
[ 28010]
Subject: [PATCH] more -ansi -pedantic cleanliness
From: Jarkko Hietaniemi <[EMAIL PROTECTED]>
Date: Sat, 29 Apr 2006 11:13:24 +0300
Message-ID: <[EMAIL PROTECTED]>
[ 28405]
Clean up a few warnings in regcomp.c under -Dgccansipedantic.
[ 28412]
Fix code before declaration error introduced by #28405
Affected files ...
... //depot/maint-5.8/perl/cop.h#29 integrate
... //depot/maint-5.8/perl/doio.c#92 integrate
... //depot/maint-5.8/perl/gv.c#90 integrate
... //depot/maint-5.8/perl/hv.c#105 integrate
... //depot/maint-5.8/perl/op.c#176 integrate
... //depot/maint-5.8/perl/pad.c#63 integrate
... //depot/maint-5.8/perl/perl.c#193 integrate
... //depot/maint-5.8/perl/perl.h#137 integrate
... //depot/maint-5.8/perl/pp.c#126 integrate
... //depot/maint-5.8/perl/pp_ctl.c#157 integrate
... //depot/maint-5.8/perl/pp_hot.c#121 integrate
... //depot/maint-5.8/perl/pp_pack.c#48 integrate
... //depot/maint-5.8/perl/pp_sort.c#44 integrate
... //depot/maint-5.8/perl/pp_sys.c#129 integrate
... //depot/maint-5.8/perl/regcomp.c#88 integrate
... //depot/maint-5.8/perl/regexec.c#78 integrate
... //depot/maint-5.8/perl/scope.h#24 edit
... //depot/maint-5.8/perl/sv.c#315 edit
... //depot/maint-5.8/perl/toke.c#147 integrate
... //depot/maint-5.8/perl/universal.c#58 integrate
... //depot/maint-5.8/perl/utf8.c#70 integrate
Differences ...
==== //depot/maint-5.8/perl/doio.c#92 (text) ====
Index: perl/doio.c
--- perl/doio.c#91~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/doio.c 2007-01-24 15:53:28.000000000 -0800
@@ -823,7 +823,7 @@
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;
}
@@ -2010,7 +2010,9 @@
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;
==== //depot/maint-5.8/perl/gv.c#90 (text) ====
Index: perl/gv.c
--- perl/gv.c#89~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/gv.c 2007-01-24 15:53:28.000000000 -0800
@@ -375,7 +375,7 @@
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,
@@ -1519,7 +1519,7 @@
DEBUG_o( Perl_deb(aTHX_ "Resolving method \"%"SVf256\
"\" for overloaded \"%s\" in package \"%.256s\"\n",
- GvSV(gv), cp, hvname) );
+ (void*)GvSV(gv), cp, hvname) );
if (!gvsv || !SvPOK(gvsv)
|| !(ngv = gv_fetchmethod_autoload(stash, SvPVX_const(gvsv),
FALSE)))
@@ -1815,7 +1815,7 @@
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;
}
==== //depot/maint-5.8/perl/hv.c#105 (text) ====
Index: perl/hv.c
--- perl/hv.c#104~29958~ 2007-01-24 11:49:21.000000000 -0800
+++ perl/hv.c 2007-01-24 15:53:28.000000000 -0800
@@ -1481,8 +1481,8 @@
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;
==== //depot/maint-5.8/perl/op.c#176 (text) ====
Index: perl/op.c
--- perl/op.c#175~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/op.c 2007-01-24 15:53:28.000000000 -0800
@@ -200,7 +200,7 @@
{
qerror(Perl_mess(aTHX_
"Bareword \"%"SVf"\" not allowed while \"strict subs\" in
use",
- cSVOPo_sv));
+ (void*)cSVOPo_sv));
}
/* "register" allocation */
@@ -4206,9 +4206,9 @@
gv_efullname3(name = sv_newmortal(), (GV *)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 ");
@@ -4216,7 +4216,7 @@
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);
}
}
@@ -4552,7 +4552,7 @@
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);
}
}
}
@@ -4879,7 +4879,7 @@
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);
@@ -5334,8 +5334,8 @@
}
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
@@ -5476,7 +5476,7 @@
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]);
op_free(kid);
kid = newop;
kid->op_sibling = sibl;
@@ -5495,7 +5495,7 @@
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]);
op_free(kid);
kid = newop;
kid->op_sibling = sibl;
@@ -6528,7 +6528,7 @@
default:
oops:
Perl_croak(aTHX_ "Malformed prototype for %s: %"SVf,
- gv_ename(namegv), cv);
+ gv_ename(namegv), (void*)cv);
}
}
else
@@ -6765,7 +6765,7 @@
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
==== //depot/maint-5.8/perl/pad.c#63 (text) ====
Index: perl/pad.c
--- perl/pad.c#62~29959~ 2007-01-24 12:33:04.000000000 -0800
+++ perl/pad.c 2007-01-24 15:53:28.000000000 -0800
@@ -975,7 +975,8 @@
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. */
==== //depot/maint-5.8/perl/perl.c#193 (text) ====
Index: perl/perl.c
--- perl/perl.c#192~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/perl.c 2007-01-24 15:53:28.000000000 -0800
@@ -3767,8 +3767,8 @@
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;
@@ -5136,19 +5136,21 @@
#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);
}
@@ -5307,7 +5309,7 @@
while (PL_scopestack_ix > oldscope)
LEAVE;
JMPENV_POP;
- Perl_croak(aTHX_ "%"SVf"", atsv);
+ Perl_croak(aTHX_ "%"SVf"", (void*)atsv);
}
break;
case 1:
==== //depot/maint-5.8/perl/perl.h#137 (text) ====
Index: perl/perl.h
--- perl/perl.h#136~29958~ 2007-01-24 11:49:21.000000000 -0800
+++ perl/perl.h 2007-01-24 15:53:28.000000000 -0800
@@ -290,7 +290,7 @@
# 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
==== //depot/maint-5.8/perl/pp.c#126 (text) ====
Index: perl/pp.c
--- perl/pp.c#125~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/pp.c 2007-01-24 15:53:28.000000000 -0800
@@ -4226,7 +4226,7 @@
}
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*);
==== //depot/maint-5.8/perl/pp_ctl.c#157 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#156~29963~ 2007-01-24 15:24:03.000000000 -0800
+++ perl/pp_ctl.c 2007-01-24 15:53:28.000000000 -0800
@@ -1322,7 +1322,7 @@
else if (PL_errors)
sv_catsv(PL_errors, err);
else
- Perl_warn(aTHX_ "%"SVf, err);
+ Perl_warn(aTHX_ "%"SVf, (void*)err);
++PL_error_count;
}
@@ -1866,7 +1866,7 @@
/* 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:
@@ -2170,7 +2170,7 @@
goto retry;
tmpstr = sv_newmortal();
gv_efullname3(tmpstr, (GV *) gv, NULL);
- DIE(aTHX_ "Goto undefined subroutine &%"SVf"",tmpstr);
+ DIE(aTHX_ "Goto undefined subroutine
&%"SVf"",(void*)tmpstr);
}
DIE(aTHX_ "Goto undefined subroutine");
}
@@ -3566,7 +3566,7 @@
/* 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 {
@@ -3935,7 +3935,7 @@
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;
==== //depot/maint-5.8/perl/pp_hot.c#121 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#120~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/pp_hot.c 2007-01-24 15:53:28.000000000 -0800
@@ -2735,7 +2735,7 @@
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)
@@ -3050,7 +3050,7 @@
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);
}
}
@@ -3066,7 +3066,9 @@
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)
==== //depot/maint-5.8/perl/pp_pack.c#48 (text) ====
Index: perl/pp_pack.c
--- perl/pp_pack.c#47~29963~ 2007-01-24 15:24:03.000000000 -0800
+++ perl/pp_pack.c 2007-01-24 15:53:28.000000000 -0800
@@ -2951,7 +2951,7 @@
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;
@@ -2965,7 +2965,7 @@
/* 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)
@@ -3023,7 +3023,7 @@
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;
@@ -3042,7 +3042,7 @@
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;
==== //depot/maint-5.8/perl/pp_sort.c#44 (text) ====
Index: perl/pp_sort.c
--- perl/pp_sort.c#43~29925~ 2007-01-22 14:10:59.000000000 -0800
+++ perl/pp_sort.c 2007-01-24 15:53:28.000000000 -0800
@@ -1518,7 +1518,7 @@
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");
==== //depot/maint-5.8/perl/pp_sys.c#129 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#128~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/pp_sys.c 2007-01-24 15:53:28.000000000 -0800
@@ -451,7 +451,7 @@
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvs("Warning: something's wrong"));
- Perl_warn(aTHX_ "%"SVf, tmpsv);
+ Perl_warn(aTHX_ "%"SVf, (void*)tmpsv);
RETSETYES;
}
@@ -515,7 +515,7 @@
if (!tmps || !len)
tmpsv = sv_2mortal(newSVpvs("Died"));
- DIE(aTHX_ "%"SVf, tmpsv);
+ DIE(aTHX_ "%"SVf, (void*)tmpsv);
}
/* I/O. */
@@ -832,7 +832,7 @@
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);
==== //depot/maint-5.8/perl/regcomp.c#88 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#87~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/regcomp.c 2007-01-24 15:53:28.000000000 -0800
@@ -4503,6 +4503,9 @@
S_regtail(pTHX_ const RExC_state_t *pRExC_state, regnode *p, const regnode
*val)
{
register regnode *scan;
+#ifndef DEBUGGING
+ PERL_UNUSED_ARG(depth);
+#endif
if (SIZE_ONLY)
return;
@@ -4858,6 +4861,7 @@
PERL_UNUSED_CONTEXT;
PERL_UNUSED_ARG(sv);
PERL_UNUSED_ARG(o);
+ PERL_UNUSED_ARG(prog);
#endif /* DEBUGGING */
}
==== //depot/maint-5.8/perl/scope.h#24 (text) ====
Index: perl/scope.h
--- perl/scope.h#23~29962~ 2007-01-24 14:51:14.000000000 -0800
+++ perl/scope.h 2007-01-24 15:53:28.000000000 -0800
@@ -346,7 +346,7 @@
STMT_START { \
if (!(ce).je_noset) { \
DEBUG_l(Perl_deb(aTHX_ "Setting up jumplevel %p, was %p\n", \
- ce, PL_top_env)); \
+ (void*)ce, (void*)PL_top_env)); \
JMPENV_PUSH_INIT_ENV(ce,NULL); \
EXCEPT_SET_ENV(ce,PerlProc_setjmp((ce).je_buf,
SCOPE_SAVES_SIGNAL_MASK));\
(ce).je_noset = 1; \
@@ -394,7 +394,7 @@
#define JMPENV_PUSH(v) \
STMT_START { \
DEBUG_l(Perl_deb(aTHX_ "Setting up jumplevel %p, was %p\n", \
- &cur_env, PL_top_env)); \
+ (void*)&cur_env, (void*)PL_top_env)); \
cur_env.je_prev = PL_top_env; \
OP_REG_TO_MEM; \
cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf,
SCOPE_SAVES_SIGNAL_MASK); \
==== //depot/maint-5.8/perl/sv.c#315 (text) ====
Index: perl/sv.c
--- perl/sv.c#314~29963~ 2007-01-24 15:24:03.000000000 -0800
+++ perl/sv.c 2007-01-24 15:53:28.000000000 -0800
@@ -660,7 +660,7 @@
newroot->next = aroot;
aroot = newroot;
PL_body_arenas = (void *) newroot;
- DEBUG_m(PerlIO_printf(Perl_debug_log, "new arenaset %p\n", *aroot));
+ DEBUG_m(PerlIO_printf(Perl_debug_log, "new arenaset %p\n", aroot));
}
/* ok, now have arena-set with at least 1 empty/available arena-desc */
@@ -4791,7 +4791,7 @@
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);
}
}
}
@@ -4949,7 +4949,7 @@
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;
@@ -5081,7 +5081,7 @@
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);
}
}
@@ -5328,7 +5328,7 @@
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;
@@ -6772,7 +6772,7 @@
else
io = 0;
if (!io)
- Perl_croak(aTHX_ "Bad filehandle: %"SVf, sv);
+ Perl_croak(aTHX_ "Bad filehandle: %"SVf, (void*)sv);
break;
}
return io;
@@ -6863,7 +6863,7 @@
LEAVE;
if (!GvCVu(gv))
Perl_croak(aTHX_ "Unable to create sub named \"%"SVf"\"",
- sv);
+ (void*)sv);
}
return GvCVu(gv);
}
@@ -8740,7 +8740,7 @@
(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 ... */
==== //depot/maint-5.8/perl/toke.c#147 (text) ====
Index: perl/toke.c
--- perl/toke.c#146~29963~ 2007-01-24 15:24:03.000000000 -0800
+++ perl/toke.c 2007-01-24 15:53:28.000000000 -0800
@@ -2315,7 +2315,7 @@
funcp = DPTR2FPTR(filter_t, IoANY(datasv));
DEBUG_P(PerlIO_printf(Perl_debug_log,
"filter_read %d: via function %p (%s)\n",
- idx, datasv, SvPV_nolen_const(datasv)));
+ idx, (void*)datasv, SvPV_nolen_const(datasv)));
/* Call function. The function is expected to */
/* call "FILTER_READ(idx+1, buf_sv)" first. */
/* Return: <0:error, =0:eof, >0:not eof */
@@ -4549,7 +4549,7 @@
PUTBACK;
PerlIO_apply_layers(aTHX_ PL_rsfp, NULL,
Perl_form(aTHX_ ":encoding(%"SVf")",
- name));
+ (void*)name));
FREETMPS;
LEAVE;
}
@@ -5431,7 +5431,7 @@
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;
@@ -5446,7 +5446,7 @@
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);
}
if (have_proto) {
@@ -10877,13 +10877,13 @@
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));
==== //depot/maint-5.8/perl/universal.c#58 (text) ====
Index: perl/universal.c
--- perl/universal.c#57~29915~ 2007-01-22 07:49:59.000000000 -0800
+++ perl/universal.c 2007-01-24 15:53:28.000000000 -0800
@@ -110,7 +110,7 @@
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)) {
@@ -638,9 +638,11 @@
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++;
==== //depot/maint-5.8/perl/utf8.c#70 (text) ====
Index: perl/utf8.c
--- perl/utf8.c#69~29958~ 2007-01-24 11:49:21.000000000 -0800
+++ perl/utf8.c 2007-01-24 15:53:28.000000000 -0800
@@ -1590,7 +1590,7 @@
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;
End of Patch.