Change 34707 by [EMAIL PROTECTED] on 2008/11/03 19:50:31
Integrate:
[ 34694]
Explicitly specify some printf formats for constant strings.
This is mostly to silence gcc's warning, "format not a string
literal and no format arguments".
[ 34695]
Subject: [PATCH] explicit empty while loops
From: "Robin Barker" <[EMAIL PROTECTED]>
Date: Wed, 29 Oct 2008 13:22:04 -0000
Message-ID: <[EMAIL PROTECTED]>
[ 34700]
Silence one more format warning
Affected files ...
... //depot/maint-5.10/perl/av.c#7 integrate
... //depot/maint-5.10/perl/doop.c#6 integrate
... //depot/maint-5.10/perl/ext/PerlIO/scalar/scalar.xs#4 integrate
... //depot/maint-5.10/perl/handy.h#7 integrate
... //depot/maint-5.10/perl/mg.c#16 integrate
... //depot/maint-5.10/perl/op.c#17 integrate
... //depot/maint-5.10/perl/perl.c#21 integrate
... //depot/maint-5.10/perl/pp.c#11 integrate
... //depot/maint-5.10/perl/pp_ctl.c#23 integrate
... //depot/maint-5.10/perl/pp_hot.c#16 integrate
... //depot/maint-5.10/perl/pp_sort.c#4 integrate
... //depot/maint-5.10/perl/pp_sys.c#9 integrate
... //depot/maint-5.10/perl/regcomp.c#19 integrate
... //depot/maint-5.10/perl/sv.c#31 integrate
... //depot/maint-5.10/perl/toke.c#10 integrate
... //depot/maint-5.10/perl/universal.c#7 integrate
... //depot/maint-5.10/perl/util.c#7 integrate
Differences ...
==== //depot/maint-5.10/perl/av.c#7 (text) ====
Index: perl/av.c
--- perl/av.c#6~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/av.c 2008-11-03 11:50:31.000000000 -0800
@@ -335,7 +335,7 @@
}
if (SvREADONLY(av) && key >= AvFILL(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if (!AvREAL(av) && AvREIFY(av))
av_reify(av);
@@ -442,7 +442,7 @@
#endif
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
/* Give any tie a chance to cleanup first */
if (SvRMAGICAL(av)) {
@@ -542,7 +542,7 @@
assert(av);
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
@@ -580,7 +580,7 @@
assert(av);
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
@@ -646,7 +646,7 @@
assert(av);
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
@@ -718,7 +718,7 @@
assert(av);
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if ((mg = SvTIED_mg((SV*)av, PERL_MAGIC_tied))) {
dSP;
PUSHSTACKi(PERLSI_MAGIC);
@@ -845,7 +845,7 @@
assert(av);
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if (SvRMAGICAL(av)) {
const MAGIC * const tied_magic = mg_find((SV*)av, PERL_MAGIC_tied);
==== //depot/maint-5.10/perl/doop.c#6 (text) ====
Index: perl/doop.c
--- perl/doop.c#5~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/doop.c 2008-11-03 11:50:31.000000000 -0800
@@ -625,7 +625,7 @@
if (SvIsCOW(sv))
sv_force_normal_flags(sv, 0);
if (SvREADONLY(sv))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
(void)SvPV_const(sv, len);
if (!len)
@@ -1000,7 +1000,7 @@
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
if (PL_encoding && !SvUTF8(sv)) {
@@ -1084,7 +1084,7 @@
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
if (PL_encoding) {
==== //depot/maint-5.10/perl/ext/PerlIO/scalar/scalar.xs#4 (text) ====
Index: perl/ext/PerlIO/scalar/scalar.xs
--- perl/ext/PerlIO/scalar/scalar.xs#3~33940~ 2008-05-27 13:57:19.000000000
-0700
+++ perl/ext/PerlIO/scalar/scalar.xs 2008-11-03 11:50:31.000000000 -0800
@@ -26,7 +26,7 @@
if (SvROK(arg)) {
if (SvREADONLY(SvRV(arg)) && mode && *mode != 'r') {
if (ckWARN(WARN_LAYER))
- Perl_warner(aTHX_ packWARN(WARN_LAYER), PL_no_modify);
+ Perl_warner(aTHX_ packWARN(WARN_LAYER), "%s", PL_no_modify);
SETERRNO(EINVAL, SS_IVCHAN);
return -1;
}
==== //depot/maint-5.10/perl/handy.h#7 (text) ====
Index: perl/handy.h
--- perl/handy.h#6~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/handy.h 2008-11-03 11:50:31.000000000 -0800
@@ -705,10 +705,10 @@
#ifdef PERL_MALLOC_WRAP
#define MEM_WRAP_CHECK(n,t) MEM_WRAP_CHECK_1(n,t,PL_memory_wrap)
#define MEM_WRAP_CHECK_1(n,t,a) \
- (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) &&
(Perl_croak_nocontext(a),0))
+ (void)(sizeof(t) > 1 && ((MEM_SIZE)(n)+0.0) > MEM_SIZE_MAX/sizeof(t) &&
(Perl_croak_nocontext("%s",(a)),0))
#define MEM_WRAP_CHECK_(n,t) MEM_WRAP_CHECK(n,t),
-#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > MEM_SIZE_MAX - 2 *
PERL_STRLEN_ROUNDUP_QUANTUM) ?
(Perl_croak_nocontext(PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))
+#define PERL_STRLEN_ROUNDUP(n) ((void)(((n) > MEM_SIZE_MAX - 2 *
PERL_STRLEN_ROUNDUP_QUANTUM) ?
(Perl_croak_nocontext("%s",PL_memory_wrap),0):0),((n-1+PERL_STRLEN_ROUNDUP_QUANTUM)&~((MEM_SIZE)PERL_STRLEN_ROUNDUP_QUANTUM-1)))
#else
==== //depot/maint-5.10/perl/mg.c#16 (text) ====
Index: perl/mg.c
--- perl/mg.c#15~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/mg.c 2008-11-03 11:50:31.000000000 -0800
@@ -582,7 +582,7 @@
{
PERL_UNUSED_ARG(sv);
PERL_UNUSED_ARG(mg);
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
NORETURN_FUNCTION_END;
}
@@ -2280,7 +2280,7 @@
* set without a previous pattern match. Unless it's C<local $1>
*/
if (!PL_localizing) {
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
}
case '\001': /* ^A */
==== //depot/maint-5.10/perl/op.c#17 (text) ====
Index: perl/op.c
--- perl/op.c#16~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/op.c 2008-11-03 11:50:31.000000000 -0800
@@ -7769,7 +7769,7 @@
const char *p = proto;
const char *const end = proto;
contextclass = 0;
- while (*--p != '[');
+ while (*--p != '[') {}
bad_type(arg, Perl_form(aTHX_ "one of %.*s",
(int)(end - p), p),
gv_ename(namegv), o3);
==== //depot/maint-5.10/perl/perl.c#21 (text) ====
Index: perl/perl.c
--- perl/perl.c#20~34601~ 2008-10-27 01:28:31.000000000 -0700
+++ perl/perl.c 2008-11-03 11:50:31.000000000 -0800
@@ -2822,7 +2822,7 @@
PUTBACK;
if (croak_on_error && SvTRUE(ERRSV)) {
- Perl_croak(aTHX_ SvPVx_nolen_const(ERRSV));
+ Perl_croak(aTHX_ "%s", SvPVx_nolen_const(ERRSV));
}
return sv;
@@ -3266,13 +3266,13 @@
upg_version(PL_patchlevel, TRUE);
#if !defined(DGUX)
PerlIO_printf(PerlIO_stdout(),
- Perl_form(aTHX_ "\nThis is perl, %"SVf
+ "\nThis is perl, %"SVf
#ifdef PERL_PATCHNUM
- " DEVEL" STRINGIFY(PERL_PATCHNUM)
+ " DEVEL" STRINGIFY(PERL_PATCHNUM)
#endif
- " built for %s",
- SVfARG(vstringify(PL_patchlevel)),
- ARCHNAME));
+ " built for %s",
+ SVfARG(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(),
==== //depot/maint-5.10/perl/pp.c#11 (text) ====
Index: perl/pp.c
--- perl/pp.c#10~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/pp.c 2008-11-03 11:50:31.000000000 -0800
@@ -158,7 +158,7 @@
* NI-S 1999/05/07
*/
if (SvREADONLY(sv))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if (PL_op->op_private & OPpDEREF) {
GV *gv;
if (cUNOP->op_targ) {
@@ -308,7 +308,7 @@
else if (gv)
sv = save_scalar(gv);
else
- Perl_croak(aTHX_ PL_no_localize_ref);
+ Perl_croak(aTHX_ "%s", PL_no_localize_ref);
}
else if (PL_op->op_private & OPpDEREF)
vivify_ref(sv, PL_op->op_private & OPpDEREF);
@@ -866,7 +866,7 @@
{
dVAR; dSP;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MIN)
{
@@ -883,7 +883,7 @@
{
dVAR; dSP; dTARGET;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
sv_setsv(TARG, TOPs);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MAX)
@@ -905,7 +905,7 @@
{
dVAR; dSP; dTARGET;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
sv_setsv(TARG, TOPs);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MIN)
==== //depot/maint-5.10/perl/pp_ctl.c#23 (text) ====
Index: perl/pp_ctl.c
--- perl/pp_ctl.c#22~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/pp_ctl.c 2008-11-03 11:50:31.000000000 -0800
@@ -1517,7 +1517,8 @@
sv_catpvn(err, message, msglen);
if (ckWARN(WARN_MISC)) {
const STRLEN start = SvCUR(err)-msglen-sizeof(prefix)+1;
- Perl_warner(aTHX_ packWARN(WARN_MISC),
SvPVX_const(err)+start);
+ Perl_warner(aTHX_ packWARN(WARN_MISC), "%s",
+ SvPVX_const(err)+start);
}
}
}
==== //depot/maint-5.10/perl/pp_hot.c#16 (text) ====
Index: perl/pp_hot.c
--- perl/pp_hot.c#15~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/pp_hot.c 2008-11-03 11:50:31.000000000 -0800
@@ -412,7 +412,7 @@
{
dVAR; dSP;
if (SvTYPE(TOPs) >= SVt_PVAV || isGV_with_GP(TOPs))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
if (!SvREADONLY(TOPs) && SvIOK_notUV(TOPs) && !SvNOK(TOPs) && !SvPOK(TOPs)
&& SvIVX(TOPs) != IV_MAX)
{
@@ -839,7 +839,7 @@
}
else if (PL_op->op_flags & OPf_MOD
&& PL_op->op_private & OPpLVAL_INTRO)
- Perl_croak(aTHX_ PL_no_localize_ref);
+ Perl_croak(aTHX_ "%s", PL_no_localize_ref);
}
else {
if (SvTYPE(sv) == type) {
@@ -956,7 +956,7 @@
}
else
err = "Odd number of elements in hash assignment";
- Perl_warner(aTHX_ packWARN(WARN_MISC), err);
+ Perl_warner(aTHX_ packWARN(WARN_MISC), "%s", err);
}
tmpstr = newSV(0);
@@ -2095,7 +2095,7 @@
|| ( ((SvTYPE(TARG) == SVt_PVGV && isGV_with_GP(TARG))
|| SvTYPE(TARG) > SVt_PVLV)
&& !(SvTYPE(TARG) == SVt_PVGV && SvFAKE(TARG)))))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
PUTBACK;
s = SvPV_mutable(TARG, len);
@@ -2965,7 +2965,7 @@
SvGETMAGIC(sv);
if (!SvOK(sv)) {
if (SvREADONLY(sv))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if (SvTYPE(sv) < SVt_RV)
sv_upgrade(sv, SVt_RV);
else if (SvTYPE(sv) >= SVt_PV) {
==== //depot/maint-5.10/perl/pp_sort.c#4 (text) ====
Index: perl/pp_sort.c
--- perl/pp_sort.c#3~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/pp_sort.c 2008-11-03 11:50:31.000000000 -0800
@@ -204,7 +204,7 @@
if (r >= t) p = r = t; /* too short to care about */
else {
while (((cmp(aTHX_ *(p-1), *p) > 0) == sense) &&
- ((p -= 2) > q));
+ ((p -= 2) > q)) {}
if (p <= q) {
/* b through r is a (long) run.
** Extend it as far as possible.
@@ -1562,7 +1562,7 @@
}
else {
if (SvREADONLY(av))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
else
SvREADONLY_on(av);
p1 = p2 = AvARRAY(av);
==== //depot/maint-5.10/perl/pp_sys.c#9 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#8~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/pp_sys.c 2008-11-03 11:50:31.000000000 -0800
@@ -1023,7 +1023,7 @@
if (SvIsCOW(sv))
sv_force_normal_flags(sv, 0);
if (SvREADONLY(sv) && !(SvPOK(sv) && SvCUR(sv) == 0))
- DIE(aTHX_ PL_no_modify);
+ DIE(aTHX_ "%s", PL_no_modify);
}
if (!SvPOK(sv)) {
if (ckWARN(WARN_MISC))
==== //depot/maint-5.10/perl/regcomp.c#19 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#18~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/regcomp.c 2008-11-03 11:50:31.000000000 -0800
@@ -1973,7 +1973,7 @@
if ( folder )
TRIE_BITMAP_SET(trie, folder[ *ch ]);
DEBUG_OPTIMISE_r(
- PerlIO_printf(Perl_debug_log,
(char*)ch)
+ PerlIO_printf(Perl_debug_log, "%s",
(char*)ch)
);
}
}
@@ -4883,7 +4883,7 @@
if (flags & RXapif_FETCH) {
return reg_named_buff_fetch(rx, key, flags);
} else if (flags & (RXapif_STORE | RXapif_DELETE | RXapif_CLEAR)) {
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
return NULL;
} else if (flags & RXapif_EXISTS) {
return reg_named_buff_exists(rx, key, flags)
@@ -5155,7 +5155,7 @@
PERL_UNUSED_ARG(value);
if (!PL_localizing)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
I32
==== //depot/maint-5.10/perl/sv.c#31 (text) ====
Index: perl/sv.c
--- perl/sv.c#30~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/sv.c 2008-11-03 11:50:31.000000000 -0800
@@ -3160,7 +3160,7 @@
sv_force_normal_flags(sv, 0);
}
if (SvREADONLY(sv)) {
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
(void) sv_utf8_upgrade(sv);
SvUTF8_off(sv);
@@ -3274,7 +3274,7 @@
#ifdef GV_UNIQUE_CHECK
if (GvUNIQUE((GV*)dstr)) {
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
#endif
@@ -3331,7 +3331,7 @@
#ifdef GV_UNIQUE_CHECK
if (GvUNIQUE((GV*)dstr)) {
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
#endif
@@ -4216,7 +4216,7 @@
}
}
else if (IN_PERL_RUNTIME)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
/* At this point I believe that I can drop the global SV mutex. */
}
#else
@@ -4234,7 +4234,7 @@
unshare_hek(SvSHARED_HEK_FROM_PV(pvx));
}
else if (IN_PERL_RUNTIME)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
#endif
if (SvROK(sv))
@@ -4605,7 +4605,7 @@
&& how != PERL_MAGIC_backref
)
{
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
}
if (SvMAGICAL(sv) || (how == PERL_MAGIC_taint && SvTYPE(sv) >= SVt_PVMG)) {
@@ -6756,7 +6756,7 @@
sv_force_normal_flags(sv, 0);
if (SvREADONLY(sv)) {
if (IN_PERL_RUNTIME)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
if (SvROK(sv)) {
IV i;
@@ -6912,7 +6912,7 @@
sv_force_normal_flags(sv, 0);
if (SvREADONLY(sv)) {
if (IN_PERL_RUNTIME)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
}
if (SvROK(sv)) {
IV i;
@@ -8138,7 +8138,7 @@
if (SvIsCOW(tmpRef))
sv_force_normal_flags(tmpRef, 0);
if (SvREADONLY(tmpRef))
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
if (SvOBJECT(tmpRef)) {
if (SvTYPE(tmpRef) != SVt_PVIO)
--PL_sv_objcount;
@@ -9613,13 +9613,13 @@
have = esignlen + zeros + elen;
if (have < zeros)
- Perl_croak_nocontext(PL_memory_wrap);
+ Perl_croak_nocontext("%s", PL_memory_wrap);
need = (have > width ? have : width);
gap = need - have;
if (need >= (((STRLEN)~0) - SvCUR(sv) - dotstrlen - 1))
- Perl_croak_nocontext(PL_memory_wrap);
+ Perl_croak_nocontext("%s", PL_memory_wrap);
SvGROW(sv, SvCUR(sv) + need + dotstrlen + 1);
p = SvEND(sv);
if (esignlen && fill == '0') {
==== //depot/maint-5.10/perl/toke.c#10 (text) ====
Index: perl/toke.c
--- perl/toke.c#9~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/toke.c 2008-11-03 11:50:31.000000000 -0800
@@ -4628,7 +4628,7 @@
&& isIDFIRST_lazy_if(s,UTF))
{
CopLINE_dec(PL_curcop);
- Perl_warner(aTHX_ packWARN(WARN_SEMICOLON), PL_warn_nosemi);
+ Perl_warner(aTHX_ packWARN(WARN_SEMICOLON), "%s",
PL_warn_nosemi);
CopLINE_inc(PL_curcop);
}
BAop(OP_BIT_AND);
@@ -5284,7 +5284,7 @@
if (PL_expect == XOPERATOR) {
if (PL_bufptr == PL_linestart) {
CopLINE_dec(PL_curcop);
- Perl_warner(aTHX_ packWARN(WARN_SEMICOLON),
PL_warn_nosemi);
+ Perl_warner(aTHX_ packWARN(WARN_SEMICOLON), "%s",
PL_warn_nosemi);
CopLINE_inc(PL_curcop);
}
else
==== //depot/maint-5.10/perl/universal.c#7 (text) ====
Index: perl/universal.c
--- perl/universal.c#6~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/universal.c 2008-11-03 11:50:31.000000000 -0800
@@ -1232,7 +1232,7 @@
if (!rx) {
if (!PL_localizing)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
else
XSRETURN_UNDEF;
}
@@ -1255,7 +1255,7 @@
Perl_croak(aTHX_ "Usage: Tie::Hash::NamedCapture::DELETE($key,
$flags)");
if (!rx)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
SP -= items;
@@ -1277,7 +1277,7 @@
rx = PL_curpm ? PM_GETRE(PL_curpm) : NULL;
if (!rx)
- Perl_croak(aTHX_ PL_no_modify);
+ Perl_croak(aTHX_ "%s", PL_no_modify);
SP -= items;
==== //depot/maint-5.10/perl/util.c#7 (text) ====
Index: perl/util.c
--- perl/util.c#6~34599~ 2008-10-26 14:44:48.000000000 -0700
+++ perl/util.c 2008-11-03 11:50:31.000000000 -0800
@@ -274,12 +274,12 @@
if (size && (count <= MEM_SIZE_MAX / size))
total_size = size * count;
else
- Perl_croak_nocontext(PL_memory_wrap);
+ Perl_croak_nocontext("%s", PL_memory_wrap);
#ifdef PERL_TRACK_MEMPOOL
if (sTHX <= MEM_SIZE_MAX - (MEM_SIZE)total_size)
total_size += sTHX;
else
- Perl_croak_nocontext(PL_memory_wrap);
+ Perl_croak_nocontext("%s", PL_memory_wrap);
#endif
#ifdef HAS_64K_LIMIT
if (total_size > 0xffff) {
End of Patch.