Ensure we continue to cover enums in switches

Where we already manage to cover an enum entirely in a switch
statement such that default: cannot be reached, help ensure
it stays that way by condemning that route.

Also adjust a 'const' I came across that is ignored.
This commit is contained in:
Aaron Gyes
2016-07-30 11:48:39 -07:00
parent acfd380176
commit ee26eafc25
9 changed files with 30 additions and 16 deletions

View File

@@ -5,6 +5,7 @@
#include <assert.h>
#include <fcntl.h>
#include <limits.h>
#include <stdlib.h>
#include <unistd.h>
#include <wchar.h>
#include <wctype.h>
@@ -759,7 +760,7 @@ bool move_word_state_machine_t::consume_char(wchar_t c) {
case move_word_style_whitespace: {
return consume_char_whitespace(c);
}
default: { return false; }
default: { abort(); }
}
}