guideline: Make explicit fallthrough cases

-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2020-08-21 13:45:52 -07:00 committed by Anas Nashif
commit 0aaae4a039
46 changed files with 105 additions and 101 deletions

View file

@ -259,7 +259,7 @@ static void *lexer_json(struct lexer *lexer)
return lexer_number;
}
/* fallthrough */
__fallthrough;
default:
if (isspace(chr)) {
ignore(lexer);
@ -343,7 +343,7 @@ static int obj_next(struct json_obj *json,
return -EINVAL;
}
/* fallthrough */
__fallthrough;
case JSON_TOK_STRING:
kv->key = token.start;
kv->key_len = (size_t)(token.end - token.start);