Powered by Linux
Re: smatch on illumos & false positive — Semantic Matching Tool

Re: smatch on illumos & false positive

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

 



On Mon, Jan 05, 2015 at 01:54:46PM -0500, Josef 'Jeff' Sipek wrote:
> It does however run into
> something it doesn't know how to deal with.  Specifically, if I include
> unistd.h, I get:
> 
> /usr/include/unistd.h:565:26: error: attribute '__returns_twice__': unknown attribute
> 
> This is because of:
> 
> extern pid_t vfork(void) __RETURNS_TWICE;                                                                 
> 
> It looks like there are other functions that are annotated with the same
> attribute (getcontext, setjmp, etc.).

This is simple enough.  It's also a Sparse thing.  So I need to push it
through their tree could you test this patch?

diff --git a/parse.c b/parse.c
index b43d683..4b167b2 100644
--- a/parse.c
+++ b/parse.c
@@ -575,6 +575,7 @@ const char *ignored_attributes[] = {
 	"__nothrow__",
 	"regparm",
 	"__regparm__",
+	"__returns_twice__",
 	"section",
 	"__section__",
 	"sentinel",

--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux