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:
parent
f0ec286759
commit
0aaae4a039
46 changed files with 105 additions and 101 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue