[PATCH 3/8] firmware: initialize variables

Holger Hans Peter Freyther holger at freyther.de
Wed Nov 23 23:43:28 UTC 2011


On 11/24/2011 12:41 AM, Alexander Huemer wrote:
> On Thu, Nov 24, 2011 at 12:07:23AM +0100, Holger Hans Peter Freyther wrote:
>> On 11/23/2011 11:59 PM, Alexander Huemer wrote:

>>
> i am a bit unsure about the best way to handle such stuff. default cases
> have the drawback that gcc does not tell you any more that enum values
> are not handled in the switch. so i try to avoid default cases on enums.

well,
a) we have a warning
b) we initialize cbits and shut the compiler up but still miss some case values.
c) we add a default: with a runtime warning..

I tend to prefer a) and c) over b).





More information about the baseband-devel mailing list