Skip to contentSkip to conversation

Attribute "sentinel"

PATCH New Morten Welinder 1 participant 1 message Mar 28, 2006 Sparse checker

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Attribute "sentinel"

[This is a resend.]

This makes sparse ignore the "sentinel" attribute.

ident-list.h +1 -0
index f5812de..3051e56 100644
@@ -53,6 +53,7 @@ IDENT(noinline);
 IDENT(deprecated);
 IDENT(__const); IDENT(__const__); IDENT(noreturn);
 IDENT(__noreturn__); IDENT(regparm); IDENT(weak); IDENT(__weak__);
+IDENT(__sentinel__); IDENT(sentinel);
 IDENT(alias); IDENT(pure); IDENT(always_inline);
 IDENT(syscall_linkage); IDENT(visibility);
 IDENT(bitwise); IDENT(__bitwise__);
parse.c +3 -0
index d871afd..4339657 100644
@@ -517,6 +517,9 @@ static const char * handle_attribute(str
 	if (attribute == &noreturn_ident ||
 	    attribute == &__noreturn___ident)
 		return NULL;
+	if (attribute == &sentinel_ident ||
+	    attribute == &__sentinel___ident)
+		return NULL;
 	if (attribute == &regparm_ident)
 		return NULL;
 	if (attribute == &weak_ident ||