projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a71054f
)
Slightly reduce code duplication.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 20 Aug 2008 12:47:45 +0000
(12:47 +0000)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 20 Aug 2008 12:47:45 +0000
(12:47 +0000)
[r21280]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
ed42823
..
9293447
100644
(file)
--- 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");
}
}