summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-04-26 11:02:45 +0100
committerNicholas Clark <nick@ccl4.org>2011-05-18 19:11:03 +0100
commit75f63940310204509f2935729c2b989e3be7c00d (patch)
tree4da30ce68217ea31dd520fafb4ddcaf5a333d6b7 /proto.h
parente72ec78c220651d4143e9b3398dd951c602d880e (diff)
downloadperl-75f63940310204509f2935729c2b989e3be7c00d.tar.gz
S_doparseform() should return void, not OP*, as it should use Perl_die not DIE
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.
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/proto.h b/proto.h
index c83fd12fc5..a733e50d6f 100644
--- a/proto.h
+++ b/proto.h
@@ -5710,8 +5710,7 @@ STATIC OP* S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **opli
#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)