a1b950687051c32e added an error condition in S_doparseform() but used DIE(...)
to report it. DIE is defined as C<return Perl_die>, which acts as a hint to the
compiler about the control flow [as Perl_die() never returns], but also forces
the return type to be OP *. Whilst this is appropriate for pp functions, it's
not for S_doparseform() -
a1b950687051c32e had to change the return type to OP*
and return NULL, just to appease DIE(). Hence use Perl_die() instead, remove
return statements, and remove the didn't-return-NULL (dead) code from
pp_formline.
#if defined(PERL_IN_PP_CTL_C)
sR |OP* |docatch |NULLOK OP *o
sR |OP* |dofindlabel |NN OP *o|NN const char *label|NN OP **opstack|NN OP **oplimit
-sR |OP* |doparseform |NN SV *sv
+s |void |doparseform |NN SV *sv
snR |bool |num_overflow |NV value|I32 fldsize|I32 frcsize
sR |I32 |dopoptoeval |I32 startingblock
sR |I32 |dopoptogiven |I32 startingblock
bool item_is_utf8 = FALSE;
bool targ_is_utf8 = FALSE;
SV * nsv = NULL;
- OP * parseres = NULL;
const char *fmt;
if (!SvMAGICAL(tmpForm) || !SvCOMPILED(tmpForm)) {
if (SvREADONLY(tmpForm)) {
SvREADONLY_off(tmpForm);
- parseres = doparseform(tmpForm);
+ doparseform(tmpForm);
SvREADONLY_on(tmpForm);
}
else
- parseres = doparseform(tmpForm);
- if (parseres)
- return parseres;
+ doparseform(tmpForm);
}
SvPV_force(PL_formtarget, len);
if (SvTAINTED(tmpForm))
RETURNOP(cx->blk_givwhen.leave_op);
}
-STATIC OP *
+static void
S_doparseform(pTHX_ SV *sv)
{
STRLEN len;
SvCOMPILED_on(sv);
if (unchopnum && repeat)
- DIE(aTHX_ "Repeated format line will never terminate (~~ and @#)");
- return 0;
+ Perl_die(aTHX_ "Repeated format line will never terminate (~~ and @#)");
}
#define PERL_ARGS_ASSERT_DOFINDLABEL \
assert(o); assert(label); assert(opstack); assert(oplimit)
-STATIC OP* S_doparseform(pTHX_ SV *sv)
- __attribute__warn_unused_result__
+STATIC void S_doparseform(pTHX_ SV *sv)
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_DOPARSEFORM \
assert(sv)