Re: tiny patch for userland project

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(6/15/12 4:00 AM), Dan Carpenter wrote:
Cool.  Thanks for the patch.  Upstream sparse actually had the
"artificial" attribute, but not the "error" attribute.  There are
some small other issues with your patch but let me clean it up and
push it upstream.

Could you send me a Signed-off-by tag and I will take care of this.

Just reply to the email with:

Signed-off-by: Your Name<email@xxxxxxxxxxx>

I've added __vector_size__ attribute for the same reason. Is this acceptable?

From 33ce294b4100fb0b6622b6a6698b71dc27523056 Mon Sep 17 00:00:00 2001
From: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxx>
Date: Fri, 15 Jun 2012 16:22:11 -0400
Subject: [PATCH] add artificial, error, and vector_size attribute into ignored_attributes table

glibc headers in "/usr/include" have some smatch unrecognized attributes.
They lead to make plenty false positive error. Thus this patch register
some keywords of gcc attriubtes.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxx>
 ident-list.h |    3 +++
 parse.c      |    6 ++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ident-list.h b/ident-list.h
index b94aece..585ae9d 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -87,6 +87,9 @@ IDENT(fastcall); IDENT(__fastcall__);
 IDENT(dllimport); IDENT(__dllimport__);
 IDENT(dllexport); IDENT(__dllexport__);
 IDENT(restrict); IDENT(__restrict);
+IDENT(artificial); IDENT(__artificial__);
+IDENT(error); IDENT(__error__);
+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
diff --git a/parse.c b/parse.c
index ca497d6..d466669 100644
--- a/parse.c
+++ b/parse.c
@@ -571,6 +571,12 @@ const char *ignored_attributes[] = {
+	"artificial",
+	"__artificial__",
+	"error",
+	"__error__",
+	"vector_size",
+	"__vector_size__",

To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]

Add to Google Powered by Linux