summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 01:16:50 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-05-18 01:16:50 (GMT)
commitabe32a00b1096c0be8196385cccb983ca2b5e497 (patch)
tree8f81ea34a6e9a9137ca8134465f14c27406295ab /enum.c
parent5d0bf9ae1507536f40bae4243c86b26300cd37b4 (diff)
enum.c: fix declaration-after-statement
* enum.c (sum_iter): workaround of mixed declarations and code. erred by -Werror=declaration-after-statement option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index 33e4483..fd6113a 100644
--- a/enum.c
+++ b/enum.c
@@ -3574,7 +3574,7 @@ struct enum_sum_memo {
static void
sum_iter(VALUE i, struct enum_sum_memo *memo)
{
- assert(memo != NULL);
+ const int unused = (assert(memo != NULL), 0);
long n = memo->n;
VALUE v = memo->v;
@@ -3663,6 +3663,7 @@ sum_iter(VALUE i, struct enum_sum_memo *memo)
memo->r = r;
memo->f = f;
memo->c = c;
+ (void)unused;
}
static VALUE