From aec53c938c34c47cdbdd6824552e0f2a5104b1cb Mon Sep 17 00:00:00 2001 From: Christopher Li Date: Fri, 23 Mar 2007 16:10:08 -0700 Subject: [PATCH] handle label attributes On Fri, Mar 23, 2007 at 03:04:59PM -0700, Randy Dunlap wrote: > 1. net/sched/cls_api.c, lines 593-611: > > return 0; > rtattr_failure: __attribute__ ((unused)) > return -1; > } Signed-Off-By: Christopher Li Signed-off-by: Josh Triplett --- parse.c | 3 ++- validation/label-attr.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 validation/label-attr.c diff --git a/parse.c b/parse.c index f0e40200..6f391772 100644 --- a/parse.c +++ b/parse.c @@ -1702,7 +1702,8 @@ static struct token *statement(struct token *token, struct statement **tree) if (match_op(token->next, ':')) { stmt->type = STMT_LABEL; stmt->label_identifier = label_symbol(token); - return statement(token->next->next, &stmt->label_statement); + token = handle_attributes(token->next->next, &stmt->label_identifier->ctype); + return statement(token, &stmt->label_statement); } } diff --git a/validation/label-attr.c b/validation/label-attr.c new file mode 100644 index 00000000..7992dc4a --- /dev/null +++ b/validation/label-attr.c @@ -0,0 +1,6 @@ +static int foo(void) +{ + return 0; +rtattr_failure: __attribute__ ((unused)) + return -1; +} -- 2.11.4.GIT