Re: [PATCH] handle label attributes

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

 



On Fri, 23 Mar 2007 16:10:08 -0700 Christopher Li wrote:

> 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;
> > }
> 
> 
> Singed-Off-By: Christopher Li<sparse@xxxxxxxxxxx>

Hi,
Yes, that does handle the label attributes cleanly.

Thanks.

> Index: sparse/parse.c
> ===================================================================
> --- sparse.orig/parse.c	2007-03-23 16:09:39.000000000 -0700
> +++ sparse/parse.c	2007-03-23 16:10:00.000000000 -0700
> @@ -1701,7 +1701,8 @@ static struct token *statement(struct to
>  		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);
>  		}
>  	}
>  
> Index: sparse/validation/label-attr.c
> ===================================================================
> --- sparse.orig/validation/label-attr.c	2007-03-23 16:10:00.000000000 -0700
> +++ sparse/validation/label-attr.c	2007-03-23 16:10:00.000000000 -0700
> @@ -0,0 +1,6 @@
> +int foo(void)
> +{
> +       return 0;
> +rtattr_failure: __attribute__ ((unused))
> +       return -1;
> +}
> 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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