Hi, On Thu, Dec 20, 2012 at 10:10:40AM +0100, David Sommerseth wrote: > > Cleanup in 2.4? > > Does it hurt to have this "dead code"? Agreed, if all the flags are > covered, we'll never see 'default' in action. But is it possible that > these flags can be extended at some point in the future, which we need > to account for? I somehow find confidence in having this "trap" with > msg(M_FATAL,...) for future scenarios. Not because I strongly believe > it will be needed, but more like a precaution (as in "Yes, we have > thought about this")
Well, I'd completely get rid of the switch/case here - we only have
4 different cases, 2 of which are handled in the same subcase, so
"setting up flags and then switch(flags), plus default: handler" seems
to add more confusion than just handling possible cases directly in
the if() statements...
In general, having a "must not happen" handler to validate assumptions
is a good thing, but if those preconditions are set by code 5 lines up,
it's a bit over the top...
gert
--
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]
fax: +49-89-35655025 [email protected]
pgpRgl_QCixTr.pgp
Description: PGP signature
