[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20110517.152651.1785846817320651943.davem@davemloft.net>
Date: Tue, 17 May 2011 15:26:51 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: bhutchings@...arflare.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] sfc: Suppress warning about combining
enum flags by gcc 4.5
From: Ben Hutchings <bhutchings@...arflare.com>
Date: Tue, 17 May 2011 19:48:41 +0100
> gcc 4.5 warns about switch statements on enumerated types containing
> case values that are a bitwise-or of two enumerators for that type.
> The use of enumerators as flags is common practice, so I think the
> warning is wrong. Keep the compiler quiet by casting the switch
> value.
>
> Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
> ---
> Will this do?
What part of "get rid of the enum" is so hard to understand?
I'll say it again: Please get rid of the enum efx_fc_type
You can define bit positions if you like, because those will
be used as a proper enum, as unique bit positions within
a set of bits. Then you can define macros as (1 << XXX)
Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists