Skip to contentSkip to conversation

sparse: Add more ignored attributes

PATCH In review Michael Buesch 2 participants 2 messages Nov 25, 2009 – Nov 26, 2009 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparse: Add more ignored attributes

This adds more ignored gcc-style attributes.

externally_visible is a standard gcc attribute.
signal is an AVR8 attribute used to define interrupt service routines.

Ignore these attributes, as they are currently not useful for sparse checking.

---

parse.c +4 -0
Index: sparse/parse.c
===================================================================
@@ -541,6 +541,10 @@ static struct init_keyword {
 	{ "__warning__",	NS_KEYWORD,	.op = &ignore_attr_op },
 	{ "bounded",	NS_KEYWORD,	.op = &ignore_attr_op },
 	{ "__bounded__",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "externally_visible",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "__externally_visible__",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "signal",	NS_KEYWORD,	.op = &ignore_attr_op },
+	{ "__signal__",	NS_KEYWORD,	.op = &ignore_attr_op },
 };
 
 void init_parser(int stream)
Signature · 1 line
Greetings, Michael.
maintainer
#1 lore raw
Quoted 4 lines · Michael Buesch

+       { "externally_visible", NS_KEYWORD,     .op = &ignore_attr_op },
+       { "__externally_visible__",     NS_KEYWORD,     .op = &ignore_attr_op },
+       { "signal",     NS_KEYWORD,     .op = &ignore_attr_op },
+       { "__signal__", NS_KEYWORD,     .op = &ignore_attr_op },

Can you update your patch base on the chrisl branch?
git://git.kernel.org/pub/scm/devel/sparse/chrisl/sparse.git

In the new code you just need to add the attribute name to ignored_attributes array.

Thanks

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html