Skip to contentSkip to conversation

Add some more ignored attributes for glibc

PATCH Applied Dan Carpenter 2 participants 5 messages Jun 18, 2012 – Jun 25, 2012 Sparse checker

lore
Share & tools
lore
#0 lore raw

cover Add some more ignored attributes for glibc

KOSAKI Motohiro sent these patches to Smatch and I'm pushing them upstream.

Smatch wasn't using the latest Sparse so I've tweaked them a bit.

KOSAKI Motohiro (2):
sparse: Add '__vector_size__' to ignored attributes
sparse: Add 'error' to ignored attributes

 ident-list.h |    2 ++
 parse.c      |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.8.rc0.dirty
#1 lore raw

PATCH 1/2 sparse: Add '__vector_size__' to ignored attributes

From: KOSAKI Motohiro <[email protected]>

We already had "vector_size" but we also need __vector_size__ to silence some warnings in glibc:

/usr/include/bits/link.h:67:45: error: attribute '__vector_size__': unknown attribute

---
 ident-list.h |    1 +
 parse.c      |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)
ident-list.h +1 -0
index b12d172..973bf57 100644
@@ -88,6 +88,7 @@ IDENT(dllimport); IDENT(__dllimport__);
 IDENT(dllexport); IDENT(__dllexport__);
 IDENT(restrict); IDENT(__restrict);
 IDENT(artificial); IDENT(__artificial__);
+IDENT(vector_size); IDENT(__vector_size__);
 
 /* Preprocessor idents.  Direct use of __IDENT avoids mentioning the keyword
  * itself by name, preventing these tokens from expanding when compiling
parse.c +1 -0
index a809c14..2dcd488 100644
@@ -568,6 +568,7 @@ const char *ignored_attributes[] = {
 	"used",
 	"__used__",
 	"vector_size",
+	"__vector_size__",
 	"visibility",
 	"__visibility__",
 	"warn_unused_result",
Signature · 1 line
1.7.8.rc0.dirty
maintainer
#2 lore raw

Re: [PATCH 1/2] sparse: Add '__vector_size__' to ignored attributes

Quoted 3 lines · Dan Carpenter

From: KOSAKI Motohiro <[email protected]>

We already had "vector_size" but we also need __vector_size__ to silence

Applied with some fix up on the patch.

Chris

#3 lore raw

PATCH 2/2 sparse: Add 'error' to ignored attributes

In reply to Dan Carpenter

From: KOSAKI Motohiro <[email protected]>

Add some more ignored attributes which are used in glibc header files. It silences the warnings such as the following:

/usr/include/bits/fcntl2.h:36:1: error: attribute '__error__': unknown attribute

---
 ident-list.h |    1 +
 parse.c      |    2 ++
 2 files changed, 3 insertions(+), 0 deletions(-)
ident-list.h +1 -0
index 973bf57..a0b808f 100644
@@ -89,6 +89,7 @@ IDENT(dllexport); IDENT(__dllexport__);
 IDENT(restrict); IDENT(__restrict);
 IDENT(artificial); IDENT(__artificial__);
 IDENT(vector_size); IDENT(__vector_size__);
+IDENT(error); IDENT(__error__);
 
 /* Preprocessor idents.  Direct use of __IDENT avoids mentioning the keyword
  * itself by name, preventing these tokens from expanding when compiling
parse.c +2 -0
index 2dcd488..db6b519 100644
@@ -509,6 +509,8 @@ const char *ignored_attributes[] = {
 	"__dllexport__",
 	"dllimport",
 	"__dllimport__",
+	"error",
+	"__error__",
 	"externally_visible",
 	"__externally_visible__",
 	"fastcall",
Signature · 1 line
1.7.8.rc0.dirty
maintainer Applied
#4 lore raw

Re: [PATCH 2/2] sparse: Add 'error' to ignored attributes

Quoted 4 lines · Dan Carpenter

From: KOSAKI Motohiro <[email protected]>

Add some more ignored attributes which are used in glibc header files.  It silences the warnings such as the following:

Applied.

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