Add some more ignored attributes for glibc
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
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
@@ -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
@@ -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
Christopher Li
maintainerRe: [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
PATCH 2/2 sparse: Add 'error' to ignored attributes
In reply to Dan CarpenterFrom: 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
@@ -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
@@ -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
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