Re: [ULOGD2 PATCH] Use attribute to avoid warning about unused parameter.

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

 



Hi,

On Thursday, 2008 July 31 at 16:46:01 +0200, Pablo Neira Ayuso wrote:
> Eric Leblond wrote:
> > Following live discussion with Pierre Chifflier, it appears that the flag
> > -Wno-unused-parameter is deprecated in gcc and has to be replaced by an
> > attribute: __attribute__ ((unused)).
> > 
> > The following patch fixes all warnings related to unused parameters by
> > correctly settings the attribute in all unused function parameters. This
> > is mainly the case for callback functions. It uses a macro named UNUSED
> > which is simply defined as __attribute__((unused)).
> 
> I don't like polluting the code with tons of UNUSED flags, sorry.

I don't like that too.

> I prefer if we use several -Wxyz options that may be report useful
> warnings instead of -Wextra.

But, the fact is that globally switching the flag can be a way to
miss some really useful warning. Patch 03/11 of this patchset
was done after seing a gcc warning.

BR,
-- 
Eric Leblond
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux