Skip to content

Instantly share code, notes, and snippets.

@rurban
Created February 24, 2014 16:25
Show Gist options
  • Save rurban/9191540 to your computer and use it in GitHub Desktop.
Save rurban/9191540 to your computer and use it in GitHub Desktop.
fixup perl5 smueller/fewer_listops3
commit eee398c1fd66c1434f722ea288ec779be2380722
Author: Reini Urban <[email protected]>
Date: Mon Feb 24 10:24:56 2014 -0600
fixup: op.c:11163:5: -Wdeclaration-after-statement
op.c: In function ‘S_null_listop_in_list_context’:
op.c:11163:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
OP *kid = cLISTOPo->op_first;
diff --git a/op.c b/op.c
index 508dce6..c401fbc 100644
--- a/op.c
+++ b/op.c
@@ -11155,12 +11155,14 @@ S_inplace_aassign(pTHX_ OP *o) {
STATIC void
S_null_listop_in_list_context(pTHX_ OP *o)
{
+ OP *kid;
+
PERL_ARGS_ASSERT_NULL_LISTOP_IN_LIST_CONTEXT;
/* This is an OP_LIST in list context. That means we
* can ditch the OP_LIST and the OP_PUSHMARK within. */
- OP *kid = cLISTOPo->op_first;
+ kid = cLISTOPo->op_first;
/* Find the end of the chain of OPs executed within the OP_LIST. */
while (kid->op_next != o) {
assert(kid);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment