From d50c4cc9ae591ce9fbbf5e57545e3f67db180a11 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 7 Apr 2009 11:25:49 +0000 Subject: [PATCH] - do NOT warn about "unnecessary static forward declaration" if the definition is a K&R style function [r25810] --- parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/parser.c b/parser.c index 293630f..0788db0 100644 --- a/parser.c +++ b/parser.c @@ -4390,6 +4390,7 @@ static entity_t *record_entity(entity_t *entity, const bool is_definition) is_definition && !prev_decl->used && !(prev_decl->modifiers & DM_USED) && + !type->function.kr_style_parameters && prev_decl->storage_class == STORAGE_CLASS_STATIC) { warningf(&previous_entity->base.source_position, "unnecessary static forward declaration for '%#T'", -- 2.20.1