mirror of https://github.com/citusdata/citus.git
Explicit switch/case fall-throughs to avoid compiler warnings.
GCC 7 added `-Wimplicit-fallthrough` to warn for not explicitly specified switch/case fall-throughs. According to https://gcc.gnu.org/gcc-7/changes.html, to suppress that warning we could either use `__attribute__(fallthrough)`, which didn't seem to work for earlier GCC versions, or a `/* fallthrough */` comment just before the following `case`. Previously Citus code had the fall-through comments inside the brackets, which didn't seem to suppress the warning. Putting a `/* fallthrough */` comment outside the brackets and right before the `case` fixes the problem.pull/1497/head^2
parent
b873e6fcc8
commit
953df34d22
|
@ -166,6 +166,7 @@ RelayEventExtendNames(Node *parseTree, char *schemaName, uint64 shardId)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fallthrough */
|
||||||
case T_CreateStmt:
|
case T_CreateStmt:
|
||||||
{
|
{
|
||||||
CreateStmt *createStmt = (CreateStmt *) parseTree;
|
CreateStmt *createStmt = (CreateStmt *) parseTree;
|
||||||
|
|
|
@ -4448,9 +4448,9 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
/* else do the same stuff as for T_SubLink et al. */
|
/* else do the same stuff as for T_SubLink et al. */
|
||||||
/* FALL THROUGH */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fallthrough */
|
||||||
case T_SubLink:
|
case T_SubLink:
|
||||||
case T_NullTest:
|
case T_NullTest:
|
||||||
case T_BooleanTest:
|
case T_BooleanTest:
|
||||||
|
|
Loading…
Reference in New Issue