Add explicit fallthrough case statements
authorDaniel Stone <daniels@collabora.com>
Tue, 11 Apr 2017 14:09:23 +0000 (15:09 +0100)
committerDaniel Stone <daniels@collabora.com>
Tue, 11 Apr 2017 14:09:23 +0000 (15:09 +0100)
When we fall through to another label in a case, add an explicit comment
noting so, to quiet GCC 7's warnings.

Signed-off-by: Daniel Stone <daniels@collabora.com>
src/compose/parser.c
src/xkbcomp/expr.c

index fd2dca9..2ca1653 100644 (file)
@@ -655,6 +655,7 @@ rhs:
         }
         production.keysym = keysym;
         production.has_keysym = true;
+       /* fallthrough */
     case TOK_END_OF_LINE:
         if (!production.has_string && !production.has_keysym) {
             scanner_warn(s, "right-hand side must have at least one of string or keysym; skipping line");
index a85f460..8b15c1c 100644 (file)
@@ -543,7 +543,7 @@ ExprResolveMaskLookup(struct xkb_context *ctx, const ExprDef *expr,
 
     case EXPR_ARRAY_REF:
         bogus = "array reference";
-
+       /* fallthrough */
     case EXPR_ACTION_DECL:
         if (bogus == NULL)
             bogus = "function use";