From: Wolfgang Bumiller Date: Sat, 23 Nov 2013 16:20:09 +0000 (+0100) Subject: make gcc happy ... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7acf115ae1fc9827ef135f8cc4b8d7791ed9013a;p=xonotic%2Fgmqcc.git make gcc happy ... --- diff --git a/ast.c b/ast.c index 60c1951..7b7737b 100644 --- a/ast.c +++ b/ast.c @@ -35,9 +35,7 @@ } \ ast_node_init((ast_node*)self, ctx, TYPE_##T); \ ( (ast_node*)self )->destroy = (ast_node_delete*)destroyfn; \ - if (iterfn) { \ - ( (ast_node*)self )->next_child = (ast_node_next_child*)iterfn; \ - } + ( (ast_node*)self )->next_child = (ast_node_next_child*)iterfn /* * forward declarations, these need not be in ast.h for obvious @@ -208,7 +206,7 @@ void ast_type_adopt_impl(ast_expression *self, const ast_expression *other) static ast_expression* ast_shallow_type(lex_ctx_t ctx, int vtype) { - ast_instantiate(ast_expression, ctx, ast_expression_delete_full, NULL); + ast_instantiate(ast_expression, ctx, ast_expression_delete_full, _ast_node_next_child); ast_expression_init(self, NULL); self->codegen = NULL; self->next = NULL; @@ -226,7 +224,7 @@ ast_expression* ast_type_copy(lex_ctx_t ctx, const ast_expression *ex) return NULL; else { - ast_instantiate(ast_expression, ctx, ast_expression_delete_full, NULL); + ast_instantiate(ast_expression, ctx, ast_expression_delete_full, _ast_node_next_child); ast_expression_init(self, NULL); fromex = ex;