Jeff King <peff@xxxxxxxx> writes: > But the cost is that we have to enumerate the set of values that are > defined but not handled here (LOFC__COUNT, for instance, isn't a real > enum value but rather a placeholder to let other code know how many > filter types there are). > > So...I dunno. Worth it as a general technique? "This is a possible value in the enum we are switching on, so I write a case arm for it, but we do nothing for it here" is OK, but if it were "we do nothing for it here or anywhere" (i.e. the maximum enum value defined as a sentinel), the resulting code would be ugly. I am not sure if the tradeoff is good to force such an ugliness on readers' eyes to squelch the -Wswitch warnings. So, I dunno.