On Tue, Jul 21, 2009 at 2:15 PM, Ramsay Jones<ramsay@xxxxxxxxxxxxxxxxxxx> wrote: >> I don't think you want to add defaults like this just to avoid warnings. >> Warnings like that can help when adding a new item to an enum, to find >> the places where you need to extend the code to hand the new item. And >> since current GCC doesn't even issue the warning by default, it seems >> even more unnecessary to add that default case. >> > > OK... > > So, if I understand your argument, in order to make the best use of these > warnings, then the correct change would look like the diff given below, > and (for more up-to-date gcc) add -Wswitch-enum to CFLAGS (at least > occasionally). OK. I don't want to list all the enumerate value here just for the sake of gcc warnings. It makes the code ugly. Nor do I want to change the gcc flags used to compile sparse. If the newest gcc still complain on those. I would rather add the blank default to make it clean. Since latest gcc doesn't issue warning on those. I think it is fine to leave it as it is. Chris -- 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