What really costs nothing is putting assert(0) in any place that should be unreachable. For example:
switch (...) {
case A:
...
case B:
...
...
default: // all possible cases are dealt with above
assert(0);
}