[sparse/f19] Add '__leaf__' to ignored attributes (bz#985105)

Jeff Layton jlayton at fedoraproject.org
Wed Jul 17 12:16:32 UTC 2013


commit 30cb4e49022701b3f438e43d4519cbe229b8bb6d
Author: Jeff Layton <jlayton at redhat.com>
Date:   Wed Jul 17 08:14:01 2013 -0400

    Add '__leaf__' to ignored attributes (bz#985105)
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>

 0001-sparse-Add-leaf-to-ignored-attributes.patch |   48 ++++++++++++++++++++++
 sparse.spec                                      |    7 +++-
 2 files changed, 54 insertions(+), 1 deletions(-)
---
diff --git a/0001-sparse-Add-leaf-to-ignored-attributes.patch b/0001-sparse-Add-leaf-to-ignored-attributes.patch
new file mode 100644
index 0000000..617af90
--- /dev/null
+++ b/0001-sparse-Add-leaf-to-ignored-attributes.patch
@@ -0,0 +1,48 @@
+From b0b4886be5f668959b8c75c9c811059e07b1073a Mon Sep 17 00:00:00 2001
+From: Ethan Jackson <ethan at nicira.com>
+Date: Tue, 17 Jan 2012 14:47:11 -0800
+Subject: [PATCH] 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 at nicira.com>
+Acked-by: Pekka Enberg <penberg at kernel.org>
+Signed-off-by: Christopher Li <sparse at 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",
+-- 
+1.8.3.1
+
diff --git a/sparse.spec b/sparse.spec
index e918a00..599d627 100644
--- a/sparse.spec
+++ b/sparse.spec
@@ -1,6 +1,6 @@
 Name: sparse
 Version: 0.4.4
-Release: 6%{?dist}
+Release: 7%{?dist}
 Summary:    A semantic parser of source files
 Group:      Development/Tools
 License:    OSL 1.1
@@ -11,6 +11,7 @@ BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: libxml2-devel gtk2-devel
 
 Patch1:     0001-sparse-add-built-in-byte-swap-identifiers.patch
+Patch2:     0001-sparse-Add-leaf-to-ignored-attributes.patch
 
 %description
 Sparse is a semantic parser of source files: it's neither a compiler
@@ -40,6 +41,7 @@ Development headers headers and static lib for sparse-enabled apps
 %prep
 %setup -q
 %patch1 -p1
+%patch2 -p1
 
 %define make_destdir \
 make DESTDIR="%{buildroot}" PREFIX="%{_prefix}" \\\
@@ -86,6 +88,9 @@ make clean
 
 
 %changelog
+* Wed Jul 17 2013 Jeff Layton <jlayton at redhat.com> - 0.4.4-7
+- add __leaf__ to ignored attributes (bz#985105)
+
 * Thu Jun 27 2013 Jeff Layton <jlayton at redhat.com> - 0.4.4-6
 - add built-in byte swap identifiers
 


More information about the scm-commits mailing list