From f75abd85e257f86baa8d24cbdb9fc2cb074e1fa4 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 20 Aug 2008 12:47:45 +0000 Subject: [PATCH] Slightly reduce code duplication. [r21280] --- parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parser.c b/parser.c index ed42823..9293447 100644 --- a/parser.c +++ b/parser.c @@ -4042,11 +4042,11 @@ static void check_type_of_main(const declaration_t *const decl, const function_t "third argument of 'main' should be 'char**', but is '%T'", third_type); } parm = parm->next; - if (parm != NULL) { - warningf(&decl->source_position, "'main' takes only zero, two or three arguments"); - } + if (parm != NULL) + goto warn_arg_count; } } else { +warn_arg_count: warningf(&decl->source_position, "'main' takes only zero, two or three arguments"); } } -- 2.20.1