File sparse-0.4.4-add_leaf_to_ignore.patch of Package sparse
commit b0b4886be5f668959b8c75c9c811059e07b1073a
Author: Ethan Jackson <ethan@nicira.com>
AuthorDate: Tue Jan 17 14:47:11 2012 -0800
Commit: Christopher Li <sparse@chrisli.org>
CommitDate: Wed Jan 18 17:44:36 2012 -0800
sparse: Add 'leaf' to ignored attributes.
This patch adds the 'leaf' GCC attribute to the list of ignored
attributes. Glibc uses this attribute causing the following
warnings in userspace projects:
/usr/include/stdlib.h:514:26: error: attribute '__leaf__': unknown attribute
Signed-off-by: Ethan Jackson <ethan@nicira.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
---
ident-list.h | 2 ++
parse.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/ident-list.h b/ident-list.h
index b12d172..35ac6bd 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -88,6 +88,8 @@ IDENT(dllimport); IDENT(__dllimport__);
IDENT(dllexport); IDENT(__dllexport__);
IDENT(restrict); IDENT(__restrict);
IDENT(artificial); IDENT(__artificial__);
+IDENT(leaf); IDENT(__leaf__);
+
/* Preprocessor idents. Direct use of __IDENT avoids mentioning the keyword
* itself by name, preventing these tokens from expanding when compiling
diff --git a/parse.c b/parse.c
index bd42180..f8ade3e 100644
--- a/parse.c
+++ b/parse.c
@@ -519,6 +519,8 @@ const char *ignored_attributes[] = {
"__format_arg__",
"hot",
"__hot__",
+ "leaf",
+ "__leaf__",
"l1_text",
"__l1_text__",
"l1_data",