[PATCH] attribute: parse but ignore enum attributes

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

 



Currently, sparse is confused whne encountering an enum attribute.

Teach sparse about these attributes and, for now, ignore them.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 parse.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/parse.c b/parse.c
index 570b2516714f..70d8b237ce5e 100644
--- a/parse.c
+++ b/parse.c
@@ -937,8 +937,12 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
 	while (token_type(token) == TOKEN_IDENT) {
 		struct expression *expr = NULL;
 		struct token *next = token->next;
+		struct decl_state ctx = { };
 		struct symbol *sym;
 
+		// FIXME: only 'deprecated' should be accepted
+		next = handle_attributes(next, &ctx, KW_ATTRIBUTE);
+
 		if (match_op(next, '=')) {
 			next = constant_expression(next->next, &expr);
 			lastval = get_expression_value(expr);
-- 
2.27.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux