Missing enum members in case statements in c2xml.c and parse.c were causing compile time complaints by gcc 5.1.1. Better to explicitly handle all enum members of the switch variable in case statements, even if they just break. Signed-off-by: Tony Camuso <tcamuso@xxxxxxxxxx> --- c2xml.c | 16 ++++++++++++++++ parse.c | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/c2xml.c b/c2xml.c index 67486c7..a53f5bd 100644 --- a/c2xml.c +++ b/c2xml.c @@ -214,6 +214,22 @@ static void examine_symbol(struct symbol *sym, xmlNodePtr node) case SYM_UNINITIALIZED: newProp(child, "base-type-builtin", builtin_typename(sym)); break; + case SYM_PREPROCESSOR: + case SYM_BASETYPE: + case SYM_NODE: + case SYM_PTR: + case SYM_ARRAY: + case SYM_ENUM: + case SYM_TYPEDEF: + case SYM_TYPEOF: + case SYM_MEMBER: + case SYM_BITFIELD: + case SYM_LABEL: + case SYM_RESTRICT: + case SYM_FOULED: + case SYM_KEYWORD: + case SYM_BAD: + break; } return; } diff --git a/parse.c b/parse.c index b43d683..74a56e4 100644 --- a/parse.c +++ b/parse.c @@ -2769,6 +2769,21 @@ struct token *external_declaration(struct token *token, struct symbol_list **lis case SYM_ENUM: case SYM_RESTRICT: base_type->ident = ident; + case SYM_PREPROCESSOR: + case SYM_BASETYPE: + case SYM_NODE: + case SYM_PTR: + case SYM_FN: + case SYM_ARRAY: + case SYM_TYPEDEF: + case SYM_TYPEOF: + case SYM_MEMBER: + case SYM_BITFIELD: + case SYM_LABEL: + case SYM_FOULED: + case SYM_KEYWORD: + case SYM_BAD: + break; } } } else if (base_type && base_type->type == SYM_FN) { -- 2.4.3 -- 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