Re: Avoiding "unused variable" warnings

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Sun Jul 13 2003 - 11:22:22 EST


On Sul, 2003-07-13 at 16:46, Jeff Garzik wrote:
> No need for a macro, just do
>
> (void) var_name;
>
> It doesn't generate any code, and it shuts up the compiler.

It may do. The proper gcc thing is attribute unused. Both are dangerous
as they hide when the variable becomes really unused

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:48 EST