From aa59d2dd11570e8cea3d8c429b94acf1001e2cc6 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Thu, 16 Feb 2017 13:23:17 +0100 Subject: Added unused attribute and simplified checks. The attribute unused can be used to indicate if a variable or parameter is unused and no warning should be emitted for it. Furthermore this commit simplifies the check by adding a generic function to traverse the program. Bug 19872 --- cfrontend/C2C.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cfrontend/C2C.ml') diff --git a/cfrontend/C2C.ml b/cfrontend/C2C.ml index 6a33c48d..eecda71b 100644 --- a/cfrontend/C2C.ml +++ b/cfrontend/C2C.ml @@ -272,7 +272,8 @@ let attributes = [ (* function-related *) ("noreturn", Cutil.Attr_function); (* name-related *) - ("section", Cutil.Attr_name) + ("section", Cutil.Attr_name); + ("unused", Cutil.Attr_name) ] -- cgit