projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15eb8da
)
- do not issue warnings for unused parameters of main: gcc suppresses them
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Sun, 31 Aug 2008 12:42:20 +0000
(12:42 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Sun, 31 Aug 2008 12:42:20 +0000
(12:42 +0000)
[r21585]
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
5961692
..
3b06caf
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-4706,6
+4706,10
@@
static void check_declarations(void)
if (warning.unused_parameter) {
const scope_t *scope = ¤t_function->scope;
+ if (is_sym_main(current_function->symbol)) {
+ /* do not issue unused warnings for main */
+ return;
+ }
const declaration_t *parameter = scope->declarations;
for (; parameter != NULL; parameter = parameter->next) {
if (! parameter->used) {