Skip to content

Commit 2993435

Browse files
committed
Further -Wimplicit-fallthrough cleanup.
Tom's earlier commit in 41c912c didn't update a few cases that are only encountered with the non-standard --with-llvm config flag. Additionally there's also one case that appears to be a deficiency in gcc's (up to trunk as of a few days ago) detection of "fallthrough" comments - changing the placement slightly fixes that. Author: Andres Freund Discussion: https://postgr.es/m/20180502003239.wfnqu7ekz7j7imm4@alap3.anarazel.de
1 parent b2328bf commit 2993435

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/backend/jit/llvm/llvmjit_expr.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ llvm_compile_expr(ExprState *state)
672672

673673
LLVMPositionBuilderAtEnd(b, b_nonull);
674674
}
675-
/* explicit fallthrough */
675+
/* FALLTHROUGH */
676+
676677
case EEOP_FUNCEXPR:
677678
{
678679
FunctionCallInfo fcinfo = op->d.func.fcinfo_data;
@@ -709,8 +710,8 @@ llvm_compile_expr(ExprState *state)
709710
l_ptr(TypeStorageBool));
710711
LLVMBuildStore(b, l_sbool_const(0), v_boolanynullp);
711712

712-
/* intentionally fall through */
713713
}
714+
/* FALLTHROUGH */
714715

715716
/*
716717
* Treat them the same for now, optimizer can remove
@@ -810,9 +811,8 @@ llvm_compile_expr(ExprState *state)
810811
v_boolanynullp = l_ptr_const(op->d.boolexpr.anynull,
811812
l_ptr(TypeStorageBool));
812813
LLVMBuildStore(b, l_sbool_const(0), v_boolanynullp);
813-
814-
/* intentionally fall through */
815814
}
815+
/* FALLTHROUGH */
816816

817817
/*
818818
* Treat them the same for now, optimizer can remove
@@ -2083,9 +2083,8 @@ llvm_compile_expr(ExprState *state)
20832083
opblocks[op->d.agg_deserialize.jumpnull],
20842084
b_deserialize);
20852085
LLVMPositionBuilderAtEnd(b, b_deserialize);
2086-
2087-
/* fallthrough */
20882086
}
2087+
/* FALLTHROUGH */
20892088

20902089
case EEOP_AGG_DESERIALIZE:
20912090
{

src/interfaces/libpq/fe-secure.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,10 @@ pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len)
360360
case EPIPE:
361361
/* Set flag for EPIPE */
362362
REMEMBER_EPIPE(spinfo, true);
363-
/* FALL THRU */
364363

365364
#ifdef ECONNRESET
365+
/* FALL THRU */
366+
366367
case ECONNRESET:
367368
#endif
368369
printfPQExpBuffer(&conn->errorMessage,

0 commit comments

Comments
 (0)