Do not suppress warnings about unused parameters of main().
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 5 May 2012 08:02:52 +0000 (10:02 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 5 May 2012 21:09:54 +0000 (23:09 +0200)
This was added with the claim that gcc suppresses them, but apparently it does not.

parser.c

index 19347bd..7280920 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -4616,11 +4616,7 @@ static void check_declarations(void)
 {
        if (is_warn_on(WARN_UNUSED_PARAMETER)) {
                const scope_t *scope = &current_function->parameters;
-
-               /* do not issue unused warnings for main */
-               if (!is_sym_main(current_function->base.base.symbol)) {
-                       warn_unused_entity(WARN_UNUSED_PARAMETER, scope->entities, NULL);
-               }
+               warn_unused_entity(WARN_UNUSED_PARAMETER, scope->entities, NULL);
        }
        if (is_warn_on(WARN_UNUSED_VARIABLE)) {
                walk_statements(current_function->statement, check_unused_variables,