diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c index c7b217288f26..88bb460082d0 100644 --- a/contrib/btree_gin/btree_gin.c +++ b/contrib/btree_gin/btree_gin.c @@ -89,7 +89,7 @@ gin_btree_extract_query(FunctionCallInfo fcinfo, case BTGreaterEqualStrategyNumber: case BTGreaterStrategyNumber: *ptr_partialmatch = true; - /* FALLTHROUGH */ + fallthru; case BTEqualStrategyNumber: entries[0] = datum; break; diff --git a/contrib/isn/isn.c b/contrib/isn/isn.c index 0c2cac7d52bf..f3faf4a9e9c5 100644 --- a/contrib/isn/isn.c +++ b/contrib/isn/isn.c @@ -852,6 +852,7 @@ string2ean(const char *str, bool errorOK, ean13 *result, case UPC: buf[2] = '0'; valid = (valid && ((rcheck = checkdig(buf + 2, 13)) == check || magic)); + fallthru; default: break; } diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c index 1b9809b565a3..8026a41191ee 100644 --- a/contrib/pg_trgm/trgm_gin.c +++ b/contrib/pg_trgm/trgm_gin.c @@ -97,7 +97,7 @@ gin_extract_query_trgm(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case LikeStrategyNumber: /* @@ -111,7 +111,7 @@ gin_extract_query_trgm(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case RegExpStrategyNumber: trg = createTrgmNFA(val, PG_GET_COLLATION(), &graph, CurrentMemoryContext); @@ -221,7 +221,7 @@ gin_trgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case LikeStrategyNumber: /* Check if all extracted trigrams are presented. */ res = true; @@ -238,7 +238,7 @@ gin_trgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case RegExpStrategyNumber: if (nkeys < 1) { @@ -306,7 +306,7 @@ gin_trgm_triconsistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case LikeStrategyNumber: /* Check if all extracted trigrams are presented. */ res = GIN_MAYBE; @@ -323,7 +323,7 @@ gin_trgm_triconsistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case RegExpStrategyNumber: if (nkeys < 1) { diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c index 6e1cb7ec9fc1..fbaaed8de587 100644 --- a/contrib/pg_trgm/trgm_gist.c +++ b/contrib/pg_trgm/trgm_gist.c @@ -210,7 +210,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case LikeStrategyNumber: qtrg = generate_wildcard_trgm(VARDATA(query), querysize - VARHDRSZ); @@ -219,7 +219,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case RegExpStrategyNumber: qtrg = createTrgmNFA(query, PG_GET_COLLATION(), &graph, fcinfo->flinfo->fn_mcxt); @@ -307,7 +307,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case LikeStrategyNumber: /* Wildcard search is inexact */ *recheck = true; @@ -348,7 +348,7 @@ gtrgm_consistent(PG_FUNCTION_ARGS) #ifndef IGNORECASE elog(ERROR, "cannot handle ~* with case-sensitive trigrams"); #endif - /* FALL THRU */ + fallthru; case RegExpStrategyNumber: /* Regexp search is inexact */ *recheck = true; diff --git a/contrib/pgcrypto/imath.c b/contrib/pgcrypto/imath.c index d5fb2929e5e6..b08d1b37362c 100644 --- a/contrib/pgcrypto/imath.c +++ b/contrib/pgcrypto/imath.c @@ -1978,7 +1978,8 @@ mp_int_read_cstring(mp_int z, mp_size radix, const char *str, ++str; break; case '+': - ++str; /* fallthrough */ + ++str; + fallthru; default: z->sign = MP_ZPOS; break; diff --git a/contrib/pgcrypto/pgp-info.c b/contrib/pgcrypto/pgp-info.c index 9bfbbe6d0c98..6777ca9d0f14 100644 --- a/contrib/pgcrypto/pgp-info.c +++ b/contrib/pgcrypto/pgp-info.c @@ -169,7 +169,7 @@ pgp_get_keyid(MBuf *pgp_data, char *dst) break; case PGP_PKT_SYMENCRYPTED_SESSKEY: got_symenc_key++; - /* fallthru */ + fallthru; case PGP_PKT_SIGNATURE: case PGP_PKT_MARKER: case PGP_PKT_TRUST: diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c index 11726ac8a527..92266151323a 100644 --- a/contrib/postgres_fdw/deparse.c +++ b/contrib/postgres_fdw/deparse.c @@ -3101,13 +3101,10 @@ deparsePartialAggFunctionParamFilter(Aggref *node, deparse_expr_cxt *context, { case 2100: /* int8 AVG */ - /* Fall through */ case 2101: /* int4 AVG function */ - /* Fall through */ case 2102: /* int2 AVG function */ - /* Fall through */ case 2103: /* numeric AVG function */ /* According to aggcombinefn, those aggregate functions need to fetch same columns from remote server. */ @@ -3116,7 +3113,6 @@ deparsePartialAggFunctionParamFilter(Aggref *node, deparse_expr_cxt *context, break; case 2104: /* float4 AVG function */ - /* Fall through */ case 2105: /* float8 AVG function */ appendStringInfo(buf, "array[count(%s)%s, sum(%s)%s, count(%s)*var_pop(%s)%s]", diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index 8744bba586a6..eecbfde7e8b7 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -6350,7 +6350,7 @@ postgresGetForeignUpperPaths(PlannerInfo *root, UpperRelationKind stage, /* It's unsafe to push having statements with partial aggregates */ if (((GroupPathExtraData *) extra)->havingQual) return; - /* Fall through */ + fallthru; /* Partial agg push down path */ case UPPERREL_GROUP_AGG: add_foreign_grouping_paths(root, input_rel, output_rel, diff --git a/gpcontrib/gp_sparse_vector/operators.c b/gpcontrib/gp_sparse_vector/operators.c index 6c85dc2acf12..d8dcec95f95d 100644 --- a/gpcontrib/gp_sparse_vector/operators.c +++ b/gpcontrib/gp_sparse_vector/operators.c @@ -411,7 +411,7 @@ svec_count(PG_FUNCTION_ARGS) * beginning of the accumulation of the correct dimension. */ left = makeSparseDataFromDouble(0.,right->total_value_count); - /* FALLTHROUGH */ + fallthru; case 0: //neither arg is scalar case 2: //right arg is scalar diff --git a/gpcontrib/gpcloud/src/s3restful_service.cpp b/gpcontrib/gpcloud/src/s3restful_service.cpp index c406ef8a7201..532894dfed85 100644 --- a/gpcontrib/gpcloud/src/s3restful_service.cpp +++ b/gpcontrib/gpcloud/src/s3restful_service.cpp @@ -237,7 +237,7 @@ Response S3RESTfulService::post(const string &url, HTTPHeaders &headers, UploadData uploadData(s3data); curl_easy_setopt(curl, CURLOPT_READDATA, (void *)&uploadData); curl_easy_setopt(curl, CURLOPT_READFUNCTION, RESTfulServiceReadFuncCallback); - curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)data.size()); + curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE_LARGE, (curl_off_t)data.size()); this->performCurl(curl, response); diff --git a/src/backend/access/heap/heapam_handler.c b/src/backend/access/heap/heapam_handler.c index 187813ed5049..7a982da77cba 100644 --- a/src/backend/access/heap/heapam_handler.c +++ b/src/backend/access/heap/heapam_handler.c @@ -917,7 +917,7 @@ heapam_relation_copy_for_cluster(Relation OldHeap, Relation NewHeap, break; case HEAPTUPLE_RECENTLY_DEAD: *tups_recently_dead += 1; - /* fall through */ + fallthru; case HEAPTUPLE_LIVE: /* Live or recently dead, must copy it */ isdead = false; diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index cc0117efe312..776c89d17282 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7757,6 +7757,7 @@ StartupXLOG(void) recoveryPausesHere(); /* drop into promote */ + fallthru; case RECOVERY_TARGET_ACTION_PROMOTE: break; diff --git a/src/backend/catalog/dependency.c b/src/backend/catalog/dependency.c index 761c4108aaaf..c9ddc616f0d2 100644 --- a/src/backend/catalog/dependency.c +++ b/src/backend/catalog/dependency.c @@ -639,7 +639,7 @@ findDependentObjects(const ObjectAddress *object, break; /* Otherwise, treat this like an internal dependency */ - /* FALL THRU */ + fallthru; case DEPENDENCY_INTERNAL: diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c index 87716d7f103d..dd2fd27c925d 100644 --- a/src/backend/catalog/objectaddress.c +++ b/src/backend/catalog/objectaddress.c @@ -2172,7 +2172,7 @@ pg_get_object_address(PG_FUNCTION_ARGS) (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("name list length must be at least %d", 3))); /* fall through to check args length */ - /* FALLTHROUGH */ + fallthru; case OBJECT_OPERATOR: if (list_length(args) != 2) ereport(ERROR, diff --git a/src/backend/cdb/cdbtm.c b/src/backend/cdb/cdbtm.c index 06254cc9fb4a..eeb08fc9a638 100644 --- a/src/backend/cdb/cdbtm.c +++ b/src/backend/cdb/cdbtm.c @@ -825,7 +825,7 @@ doNotifyingAbort(void) setCurrentDtxState(DTX_STATE_RETRY_ABORT_PREPARED); setDistributedTransactionContext(DTX_CONTEXT_QD_RETRY_PHASE_2); } - /* FALL THRU */ + fallthru; case DTX_STATE_RETRY_ABORT_PREPARED: retryAbortPrepared(); diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c index c5996c438842..6884214e2ced 100644 --- a/src/backend/commands/explain.c +++ b/src/backend/commands/explain.c @@ -2352,7 +2352,7 @@ ExplainNode(PlanState *planstate, List *ancestors, show_tablesample(((SampleScan *) plan)->tablesample, planstate, ancestors, es); /* fall through to print additional fields the same as SeqScan */ - /* FALLTHROUGH */ + fallthru; case T_SeqScan: case T_DynamicSeqScan: case T_ValuesScan: diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 00a727511b3e..2c9a9bd71c18 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -14587,7 +14587,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock case RELKIND_AOVISIMAP: if (recursing) break; - /* FALL THRU */ + fallthru; default: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 50c90f86aa08..5ed0b59b50b7 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -4381,7 +4381,7 @@ AfterTriggerExecute(EState *estate, trig_tuple_slot2)) elog(ERROR, "failed to fetch tuple2 for AFTER trigger"); } - /* fall through */ + fallthru; case AFTER_TRIGGER_FDW_REUSE: /* diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 9808a3c127d2..7ed7d6a76f9e 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -2326,7 +2326,7 @@ ExecAgg(PlanState *pstate) case AGG_HASHED: if (!node->table_filled) agg_fill_hash_table(node); - /* FALLTHROUGH */ + fallthru; case AGG_MIXED: result = agg_retrieve_hash_table(node); break; diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index b25e3a79821d..29ca405de7f7 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -291,7 +291,7 @@ MultiExecParallelHash(HashState *node) * way, wait for everyone to arrive here so we can proceed. */ BarrierArriveAndWait(build_barrier, WAIT_EVENT_HASH_BUILD_ALLOCATING); - /* Fall through. */ + fallthru; case PHJ_BUILD_HASHING_INNER: @@ -1349,13 +1349,13 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable) /* All other participants just flush their tuples to disk. */ ExecParallelHashCloseBatchAccessors(hashtable); } - /* Fall through. */ + fallthru; case PHJ_GROW_BATCHES_ALLOCATING: /* Wait for the above to be finished. */ BarrierArriveAndWait(&pstate->grow_batches_barrier, WAIT_EVENT_HASH_GROW_BATCHES_ALLOCATING); - /* Fall through. */ + fallthru; case PHJ_GROW_BATCHES_REPARTITIONING: /* Make sure that we have the current dimensions and buckets. */ @@ -1368,7 +1368,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable) /* Wait for the above to be finished. */ BarrierArriveAndWait(&pstate->grow_batches_barrier, WAIT_EVENT_HASH_GROW_BATCHES_REPARTITIONING); - /* Fall through. */ + fallthru; case PHJ_GROW_BATCHES_DECIDING: @@ -1423,7 +1423,7 @@ ExecParallelHashIncreaseNumBatches(HashJoinTable hashtable) dsa_free(hashtable->area, pstate->old_batches); pstate->old_batches = InvalidDsaPointer; } - /* Fall through. */ + fallthru; case PHJ_GROW_BATCHES_FINISHING: /* Wait for the above to complete. */ @@ -1701,13 +1701,13 @@ ExecParallelHashIncreaseNumBuckets(HashJoinTable hashtable) /* Clear the flag. */ pstate->growth = PHJ_GROWTH_OK; } - /* Fall through. */ + fallthru; case PHJ_GROW_BUCKETS_ALLOCATING: /* Wait for the above to complete. */ BarrierArriveAndWait(&pstate->grow_buckets_barrier, WAIT_EVENT_HASH_GROW_BUCKETS_ALLOCATING); - /* Fall through. */ + fallthru; case PHJ_GROW_BUCKETS_REINSERTING: /* Reinsert all tuples into the hash table. */ diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 149a22f0f3ee..3a3475845d2d 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -417,7 +417,7 @@ ExecHashJoinImpl(PlanState *pstate, bool parallel) else node->hj_JoinState = HJ_NEED_NEW_OUTER; - /* FALL THRU */ + fallthru; case HJ_NEED_NEW_OUTER: @@ -511,7 +511,7 @@ ExecHashJoinImpl(PlanState *pstate, bool parallel) /* OK, let's scan the bucket for matches */ node->hj_JoinState = HJ_SCAN_BUCKET; - /* FALL THRU */ + fallthru; case HJ_SCAN_BUCKET: @@ -1389,13 +1389,13 @@ ExecParallelHashJoinNewBatch(HashJoinState *hjstate) if (BarrierArriveAndWait(batch_barrier, WAIT_EVENT_HASH_BATCH_ELECTING)) ExecParallelHashTableAlloc(hashtable, batchno); - /* Fall through. */ + fallthru; case PHJ_BATCH_ALLOCATING: /* Wait for allocation to complete. */ BarrierArriveAndWait(batch_barrier, WAIT_EVENT_HASH_BATCH_ALLOCATING); - /* Fall through. */ + fallthru; case PHJ_BATCH_LOADING: /* Start (or join in) loading tuples. */ @@ -1415,7 +1415,7 @@ ExecParallelHashJoinNewBatch(HashJoinState *hjstate) sts_end_parallel_scan(inner_tuples); BarrierArriveAndWait(batch_barrier, WAIT_EVENT_HASH_BATCH_LOADING); - /* Fall through. */ + fallthru; case PHJ_BATCH_PROBING: diff --git a/src/backend/executor/nodeLimit.c b/src/backend/executor/nodeLimit.c index ab15acd22513..694c64152804 100644 --- a/src/backend/executor/nodeLimit.c +++ b/src/backend/executor/nodeLimit.c @@ -71,7 +71,7 @@ ExecLimit_guts(PlanState *pstate) */ recompute_limits(node); - /* FALL THRU */ + fallthru; case LIMIT_RESCAN: diff --git a/src/backend/fts/ftsprobe.c b/src/backend/fts/ftsprobe.c index 5696976c4232..161aa4f9555d 100644 --- a/src/backend/fts/ftsprobe.c +++ b/src/backend/fts/ftsprobe.c @@ -859,7 +859,7 @@ processRetry(fts_context *context) if (!(ftsInfo->result.retryRequested && context->has_mirrors && SEGMENT_IS_ALIVE(ftsInfo->mirror_cdbinfo))) break; - /* else, fallthrough */ + fallthru; case FTS_PROBE_FAILED: case FTS_SYNCREP_OFF_FAILED: case FTS_PROMOTE_FAILED: diff --git a/src/backend/jit/llvm/llvmjit_expr.c b/src/backend/jit/llvm/llvmjit_expr.c index 5ee7bb57d71f..48bb4d0b4ab9 100644 --- a/src/backend/jit/llvm/llvmjit_expr.c +++ b/src/backend/jit/llvm/llvmjit_expr.c @@ -664,7 +664,7 @@ llvm_compile_expr(ExprState *state) LLVMPositionBuilderAtEnd(b, b_nonull); } - /* FALLTHROUGH */ + fallthru; case EEOP_FUNCEXPR: { @@ -703,7 +703,7 @@ llvm_compile_expr(ExprState *state) LLVMBuildStore(b, l_sbool_const(0), v_boolanynullp); } - /* FALLTHROUGH */ + fallthru; /* * Treat them the same for now, optimizer can remove @@ -804,7 +804,7 @@ llvm_compile_expr(ExprState *state) l_ptr(TypeStorageBool)); LLVMBuildStore(b, l_sbool_const(0), v_boolanynullp); } - /* FALLTHROUGH */ + fallthru; /* * Treat them the same for now, optimizer can remove @@ -2111,7 +2111,7 @@ llvm_compile_expr(ExprState *state) b_deserialize); LLVMPositionBuilderAtEnd(b, b_deserialize); } - /* FALLTHROUGH */ + fallthru; case EEOP_AGG_DESERIALIZE: { diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index cba61dc6fd91..f0e79d31f1c8 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -2467,7 +2467,7 @@ pam_passwd_conv_proc(int num_msg, const struct pam_message **msg, ereport(LOG, (errmsg("error from underlying PAM layer: %s", msg[i]->msg))); - /* FALL THROUGH */ + fallthru; case PAM_TEXT_INFO: /* we don't bother to log TEXT_INFO messages */ if ((reply[i].resp = strdup("")) == NULL) diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index a21dcfa62222..ba698dff532a 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -1714,7 +1714,7 @@ find_nonnullable_rels_walker(Node *node, bool top_level) * the intersection of the sets of nonnullable rels, just as * for OR. Fall through to share code. */ - /* FALL THRU */ + fallthru; case OR_EXPR: /* @@ -1939,7 +1939,7 @@ find_nonnullable_vars_walker(Node *node, bool top_level) * the intersection of the sets of nonnullable vars, just as * for OR. Fall through to share code. */ - /* FALL THRU */ + fallthru; case OR_EXPR: /* diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 6ac85d726900..f42d6cb75aba 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -852,7 +852,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) errmsg("primary key constraints are not supported on foreign tables"), parser_errposition(cxt->pstate, constraint->location))); - /* FALL THRU */ + fallthru; case CONSTR_UNIQUE: if (cxt->isforeign) diff --git a/src/backend/partitioning/partprune.c b/src/backend/partitioning/partprune.c index 695baa496a42..a2843d900481 100644 --- a/src/backend/partitioning/partprune.c +++ b/src/backend/partitioning/partprune.c @@ -2712,7 +2712,7 @@ get_matching_list_bounds(PartitionPruneContext *context, case BTGreaterEqualStrategyNumber: inclusive = true; - /* fall through */ + fallthru; case BTGreaterStrategyNumber: off = partition_list_bsearch(partsupfunc, partcollation, @@ -2747,7 +2747,7 @@ get_matching_list_bounds(PartitionPruneContext *context, case BTLessEqualStrategyNumber: inclusive = true; - /* fall through */ + fallthru; case BTLessStrategyNumber: off = partition_list_bsearch(partsupfunc, partcollation, @@ -2994,7 +2994,7 @@ get_matching_range_bounds(PartitionPruneContext *context, case BTGreaterEqualStrategyNumber: inclusive = true; - /* fall through */ + fallthru; case BTGreaterStrategyNumber: /* @@ -3075,7 +3075,7 @@ get_matching_range_bounds(PartitionPruneContext *context, case BTLessEqualStrategyNumber: inclusive = true; - /* fall through */ + fallthru; case BTLessStrategyNumber: /* diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 4af867f5f9b2..1f5d08b23556 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -6515,19 +6515,18 @@ bgworker_should_start_now(BgWorkerStartTime start_time) return true; if (start_time == BgWorkerStart_RecoveryFinished) return true; - /* fall through */ + fallthru; case PM_HOT_STANDBY: if (start_time == BgWorkerStart_ConsistentState) return true; - /* fall through */ + fallthru; case PM_RECOVERY: case PM_STARTUP: case PM_INIT: if (start_time == BgWorkerStart_PostmasterStart) return true; - /* fall through */ } diff --git a/src/backend/regex/regc_lex.c b/src/backend/regex/regc_lex.c index 16664531641c..2426de1f789c 100644 --- a/src/backend/regex/regc_lex.c +++ b/src/backend/regex/regc_lex.c @@ -875,7 +875,7 @@ lexescape(struct vars *v) /* oops, doesn't look like it's a backref after all... */ v->now = save; /* and fall through into octal number */ - /* FALLTHROUGH */ + fallthru; case CHR('0'): NOTE(REG_UUNPORT); v->now--; /* put first digit back */ diff --git a/src/backend/regex/regc_pg_locale.c b/src/backend/regex/regc_pg_locale.c index 4a808b7606cf..887da6580f2e 100644 --- a/src/backend/regex/regc_pg_locale.c +++ b/src/backend/regex/regc_pg_locale.c @@ -303,7 +303,7 @@ pg_wc_isdigit(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswdigit((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isdigit((unsigned char) c)); @@ -312,7 +312,7 @@ pg_wc_isdigit(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswdigit_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -339,7 +339,7 @@ pg_wc_isalpha(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswalpha((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isalpha((unsigned char) c)); @@ -348,7 +348,7 @@ pg_wc_isalpha(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswalpha_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -375,7 +375,7 @@ pg_wc_isalnum(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswalnum((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isalnum((unsigned char) c)); @@ -384,7 +384,7 @@ pg_wc_isalnum(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswalnum_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -411,7 +411,7 @@ pg_wc_isupper(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswupper((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isupper((unsigned char) c)); @@ -420,7 +420,7 @@ pg_wc_isupper(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswupper_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -447,7 +447,7 @@ pg_wc_islower(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswlower((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && islower((unsigned char) c)); @@ -456,7 +456,7 @@ pg_wc_islower(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswlower_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -483,7 +483,7 @@ pg_wc_isgraph(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswgraph((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isgraph((unsigned char) c)); @@ -492,7 +492,7 @@ pg_wc_isgraph(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswgraph_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -519,7 +519,7 @@ pg_wc_isprint(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswprint((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isprint((unsigned char) c)); @@ -528,7 +528,7 @@ pg_wc_isprint(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswprint_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -555,7 +555,7 @@ pg_wc_ispunct(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswpunct((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && ispunct((unsigned char) c)); @@ -564,7 +564,7 @@ pg_wc_ispunct(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswpunct_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -591,7 +591,7 @@ pg_wc_isspace(pg_wchar c) case PG_REGEX_LOCALE_WIDE: if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswspace((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: return (c <= (pg_wchar) UCHAR_MAX && isspace((unsigned char) c)); @@ -600,7 +600,7 @@ pg_wc_isspace(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return iswspace_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T return (c <= (pg_wchar) UCHAR_MAX && @@ -631,7 +631,7 @@ pg_wc_toupper(pg_wchar c) return pg_ascii_toupper((unsigned char) c); if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return towupper((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: /* force C behavior for ASCII characters, per comments above */ if (c <= (pg_wchar) 127) @@ -644,7 +644,7 @@ pg_wc_toupper(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return towupper_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T if (c <= (pg_wchar) UCHAR_MAX) @@ -675,7 +675,7 @@ pg_wc_tolower(pg_wchar c) return pg_ascii_tolower((unsigned char) c); if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return towlower((wint_t) c); - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE: /* force C behavior for ASCII characters, per comments above */ if (c <= (pg_wchar) 127) @@ -688,7 +688,7 @@ pg_wc_tolower(pg_wchar c) if (sizeof(wchar_t) >= 4 || c <= (pg_wchar) 0xFFFF) return towlower_l((wint_t) c, pg_regex_locale->info.lt); #endif - /* FALL THRU */ + fallthru; case PG_REGEX_LOCALE_1BYTE_L: #ifdef HAVE_LOCALE_T if (c <= (pg_wchar) UCHAR_MAX) diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c index 0de7becabcff..858b22fb111f 100644 --- a/src/backend/regex/regcomp.c +++ b/src/backend/regex/regcomp.c @@ -910,7 +910,7 @@ parseqatom(struct vars *v, /* legal in EREs due to specification botch */ NOTE(REG_UPBOTCH); /* fall through into case PLAIN */ - /* FALLTHROUGH */ + fallthru; case PLAIN: onechr(v, v->nextvalue, lp, rp); okcolors(v->nfa, v->cm); diff --git a/src/backend/replication/logical/reorderbuffer.c b/src/backend/replication/logical/reorderbuffer.c index 475f76fa5e0e..1df5b0b902ac 100644 --- a/src/backend/replication/logical/reorderbuffer.c +++ b/src/backend/replication/logical/reorderbuffer.c @@ -1540,7 +1540,7 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid, change = specinsert; change->action = REORDER_BUFFER_CHANGE_INSERT; - /* intentionally fall through */ + fallthru; case REORDER_BUFFER_CHANGE_INSERT: case REORDER_BUFFER_CHANGE_UPDATE: case REORDER_BUFFER_CHANGE_DELETE: diff --git a/src/backend/replication/walreceiver.c b/src/backend/replication/walreceiver.c index fe3f71f6877d..d67b9aac478c 100644 --- a/src/backend/replication/walreceiver.c +++ b/src/backend/replication/walreceiver.c @@ -207,7 +207,7 @@ WalReceiverMain(void) case WALRCV_STOPPING: /* If we've already been requested to stop, don't start up. */ walrcv->walRcvState = WALRCV_STOPPED; - /* fall through */ + fallthru; case WALRCV_STOPPED: SpinLockRelease(&walrcv->mutex); diff --git a/src/backend/replication/walreceiverfuncs.c b/src/backend/replication/walreceiverfuncs.c index f85fa220868e..b18375e4e76c 100644 --- a/src/backend/replication/walreceiverfuncs.c +++ b/src/backend/replication/walreceiverfuncs.c @@ -201,7 +201,7 @@ ShutdownWalRcv(void) case WALRCV_WAITING: case WALRCV_RESTARTING: walrcv->walRcvState = WALRCV_STOPPING; - /* fall through */ + fallthru; case WALRCV_STOPPING: walrcvpid = walrcv->pid; break; diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index beb70b721301..01172eebeb78 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -3707,7 +3707,7 @@ RecoveryConflictInterrupt(ProcSignalReason reason) return; /* Intentional fall through to check wait for pin */ - /* FALLTHROUGH */ + fallthru; case PROCSIG_RECOVERY_CONFLICT_BUFFERPIN: @@ -3733,7 +3733,7 @@ RecoveryConflictInterrupt(ProcSignalReason reason) MyProc->recoveryConflictPending = true; /* Intentional fall through to error handling */ - /* FALLTHROUGH */ + fallthru; case PROCSIG_RECOVERY_CONFLICT_LOCK: case PROCSIG_RECOVERY_CONFLICT_TABLESPACE: @@ -3778,7 +3778,7 @@ RecoveryConflictInterrupt(ProcSignalReason reason) } /* Intentional fall through to session cancel */ - /* FALLTHROUGH */ + fallthru; case PROCSIG_RECOVERY_CONFLICT_DATABASE: RecoveryConflictPending = true; diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index dd79899ac69f..61115e686166 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -2272,7 +2272,7 @@ ExecDropStmt(DropStmt *stmt, bool isTopLevel) if (stmt->concurrent && Gp_role != GP_ROLE_EXECUTE) PreventInTransactionBlock(isTopLevel, "DROP INDEX CONCURRENTLY"); - /* fall through */ + fallthru; case OBJECT_TABLE: case OBJECT_SEQUENCE: diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 65dd09fdfef0..62a2d6c8e417 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -1882,8 +1882,6 @@ DecodeTimeOnly(char **field, int *ftype, int nf, case DTK_DAY: if (tzp == NULL) return DTERR_BAD_FORMAT; - default: - break; } errno = 0; @@ -3141,7 +3139,7 @@ DecodeInterval(char **field, int *ftype, int nf, int range, * handle signed float numbers and signed year-month values. */ - /* FALLTHROUGH */ + fallthru; case DTK_DATE: case DTK_NUMBER: @@ -3572,7 +3570,7 @@ DecodeISO8601Interval(char *str, continue; } /* Else fall through to extended alternative format */ - /* FALLTHROUGH */ + fallthru; case '-': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) @@ -3651,7 +3649,7 @@ DecodeISO8601Interval(char *str, return 0; } /* Else fall through to extended alternative format */ - /* FALLTHROUGH */ + fallthru; case ':': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 0d23efa622a2..aa09b3c895ec 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1120,7 +1120,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) case NUM_D: num->flag |= NUM_F_LDECIMAL; num->need_locale = true; - /* FALLTHROUGH */ + fallthru; case NUM_DEC: if (IS_DECIMAL(num)) ereport(ERROR, @@ -2973,7 +2973,6 @@ DCH_to_char(FormatNode *node, bool is_interval, TmToChar *in, char *out, Oid col s += strlen(s); break; case DCH_RM: - /* FALLTHROUGH */ case DCH_rm: /* diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index ba964f68a91d..d8f677279746 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -595,7 +595,7 @@ pushJsonbValueScalar(JsonbParseState **pstate, JsonbIteratorToken seq, break; case WJB_END_OBJECT: uniqueifyJsonbObject(&(*pstate)->contVal); - /* fall through! */ + fallthru; case WJB_END_ARRAY: /* Steps here common to WJB_END_OBJECT case */ Assert(!scalarVal); diff --git a/src/backend/utils/adt/jsonpath.c b/src/backend/utils/adt/jsonpath.c index 7f322485e7b1..a61f4228ddef 100644 --- a/src/backend/utils/adt/jsonpath.c +++ b/src/backend/utils/adt/jsonpath.c @@ -331,7 +331,7 @@ flattenJsonPathParseItem(StringInfo buf, JsonPathParseItem *item, break; case jpiFilter: argNestingLevel++; - /* FALLTHROUGH */ + fallthru; case jpiIsUnknown: case jpiNot: case jpiPlus: @@ -440,15 +440,12 @@ alignStringInfoInt(StringInfo buf) { case 3: appendStringInfoCharMacro(buf, 0); - /* FALLTHROUGH */ + fallthru; case 2: appendStringInfoCharMacro(buf, 0); - /* FALLTHROUGH */ + fallthru; case 1: appendStringInfoCharMacro(buf, 0); - /* FALLTHROUGH */ - default: - break; } } @@ -855,7 +852,7 @@ jspInitByBuffer(JsonPathItem *v, char *base, int32 pos) case jpiString: case jpiVariable: read_int32(v->content.value.datalen, base, pos); - /* FALLTHROUGH */ + fallthru; case jpiNumeric: case jpiBool: v->content.value.data = base + pos; diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index a3cca5e6400a..b9ed9e184de2 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -1939,13 +1939,13 @@ numeric_abbrev_convert_var(const NumericVar *var, NumericSortSupport *nss) { default: result |= ((int64) var->digits[3]); - /* FALLTHROUGH */ + fallthru; case 3: result |= ((int64) var->digits[2]) << 14; - /* FALLTHROUGH */ + fallthru; case 2: result |= ((int64) var->digits[1]) << 28; - /* FALLTHROUGH */ + fallthru; case 1: result |= ((int64) var->digits[0]) << 42; break; diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index fc0744b64292..e9f34f336e3a 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -7810,7 +7810,7 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) } /* else do the same stuff as for T_SubLink et al. */ } - /* FALLTHROUGH */ + fallthru; case T_SubLink: case T_NullTest: @@ -10563,7 +10563,6 @@ get_from_clause_item(Node *jtnode, Query *query, deparse_context *context) break; case RTE_TABLEFUNCTION: /* Table Function RTE */ - /* fallthrough */ case RTE_FUNCTION: /* Function RTE */ rtfunc1 = (RangeTblFunction *) linitial(rte->functions); diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 52f0a67e9408..b0ed21de03f8 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -4533,14 +4533,14 @@ timestamp_trunc(PG_FUNCTION_ARGS) tm->tm_year = ((tm->tm_year + 999) / 1000) * 1000 - 999; else tm->tm_year = -((999 - (tm->tm_year - 1)) / 1000) * 1000 + 1; - /* FALL THRU */ + fallthru; case DTK_CENTURY: /* see comments in timestamptz_trunc */ if (tm->tm_year > 0) tm->tm_year = ((tm->tm_year + 99) / 100) * 100 - 99; else tm->tm_year = -((99 - (tm->tm_year - 1)) / 100) * 100 + 1; - /* FALL THRU */ + fallthru; case DTK_DECADE: /* see comments in timestamptz_trunc */ if (val != DTK_MILLENNIUM && val != DTK_CENTURY) @@ -4550,25 +4550,25 @@ timestamp_trunc(PG_FUNCTION_ARGS) else tm->tm_year = -((8 - (tm->tm_year - 1)) / 10) * 10; } - /* FALL THRU */ + fallthru; case DTK_YEAR: tm->tm_mon = 1; - /* FALL THRU */ + fallthru; case DTK_QUARTER: tm->tm_mon = (3 * ((tm->tm_mon - 1) / 3)) + 1; - /* FALL THRU */ + fallthru; case DTK_MONTH: tm->tm_mday = 1; - /* FALL THRU */ + fallthru; case DTK_DAY: tm->tm_hour = 0; - /* FALL THRU */ + fallthru; case DTK_HOUR: tm->tm_min = 0; - /* FALL THRU */ + fallthru; case DTK_MINUTE: tm->tm_sec = 0; - /* FALL THRU */ + fallthru; case DTK_SECOND: fsec = 0; break; @@ -4674,14 +4674,14 @@ timestamptz_trunc_internal(text *units, TimestampTz timestamp, pg_tz *tzp) tm->tm_year = ((tm->tm_year + 999) / 1000) * 1000 - 999; else tm->tm_year = -((999 - (tm->tm_year - 1)) / 1000) * 1000 + 1; - /* FALL THRU */ + fallthru; case DTK_CENTURY: /* truncating to the century? as above: -100, 1, 101... */ if (tm->tm_year > 0) tm->tm_year = ((tm->tm_year + 99) / 100) * 100 - 99; else tm->tm_year = -((99 - (tm->tm_year - 1)) / 100) * 100 + 1; - /* FALL THRU */ + fallthru; case DTK_DECADE: /* @@ -4695,26 +4695,26 @@ timestamptz_trunc_internal(text *units, TimestampTz timestamp, pg_tz *tzp) else tm->tm_year = -((8 - (tm->tm_year - 1)) / 10) * 10; } - /* FALL THRU */ + fallthru; case DTK_YEAR: tm->tm_mon = 1; - /* FALL THRU */ + fallthru; case DTK_QUARTER: tm->tm_mon = (3 * ((tm->tm_mon - 1) / 3)) + 1; - /* FALL THRU */ + fallthru; case DTK_MONTH: tm->tm_mday = 1; - /* FALL THRU */ + fallthru; case DTK_DAY: tm->tm_hour = 0; redotz = true; /* for all cases >= DAY */ - /* FALL THRU */ + fallthru; case DTK_HOUR: tm->tm_min = 0; - /* FALL THRU */ + fallthru; case DTK_MINUTE: tm->tm_sec = 0; - /* FALL THRU */ + fallthru; case DTK_SECOND: fsec = 0; break; @@ -4862,33 +4862,33 @@ interval_trunc(PG_FUNCTION_ARGS) case DTK_MILLENNIUM: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 1000) * 1000; - /* FALL THRU */ + fallthru; case DTK_CENTURY: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 100) * 100; - /* FALL THRU */ + fallthru; case DTK_DECADE: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 10) * 10; - /* FALL THRU */ + fallthru; case DTK_YEAR: tm->tm_mon = 0; - /* FALL THRU */ + fallthru; case DTK_QUARTER: tm->tm_mon = 3 * (tm->tm_mon / 3); - /* FALL THRU */ + fallthru; case DTK_MONTH: tm->tm_mday = 0; - /* FALL THRU */ + fallthru; case DTK_DAY: tm->tm_hour = 0; - /* FALL THRU */ + fallthru; case DTK_HOUR: tm->tm_min = 0; - /* FALL THRU */ + fallthru; case DTK_MINUTE: tm->tm_sec = 0; - /* FALL THRU */ + fallthru; case DTK_SECOND: fsec = 0; break; diff --git a/src/backend/utils/adt/tsginidx.c b/src/backend/utils/adt/tsginidx.c index 81422c8e85aa..a41a80a1652e 100644 --- a/src/backend/utils/adt/tsginidx.c +++ b/src/backend/utils/adt/tsginidx.c @@ -264,7 +264,7 @@ TS_execute_ternary(GinChkVal *gcv, QueryItem *curitem, bool in_phrase) /* Pass down in_phrase == true in case there's a NOT below */ in_phrase = true; - /* FALL THRU */ + fallthru; case OP_AND: val1 = TS_execute_ternary(gcv, curitem + curitem->qoperator.left, diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index cd9d606158e8..7a51b2e810a7 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -285,19 +285,19 @@ CatalogCacheComputeHashValue(CatCache *cache, int nkeys, hashValue ^= oneHash << 24; hashValue ^= oneHash >> 8; - /* FALLTHROUGH */ + fallthru; case 3: oneHash = (cc_hashfunc[2]) (v3); hashValue ^= oneHash << 16; hashValue ^= oneHash >> 16; - /* FALLTHROUGH */ + fallthru; case 2: oneHash = (cc_hashfunc[1]) (v2); hashValue ^= oneHash << 8; hashValue ^= oneHash >> 24; - /* FALLTHROUGH */ + fallthru; case 1: oneHash = (cc_hashfunc[0]) (v1); @@ -336,21 +336,21 @@ CatalogCacheComputeTupleHashValue(CatCache *cache, int nkeys, HeapTuple tuple) cc_tupdesc, &isNull); Assert(!isNull); - /* FALLTHROUGH */ + fallthru; case 3: v3 = fastgetattr(tuple, cc_keyno[2], cc_tupdesc, &isNull); Assert(!isNull); - /* FALLTHROUGH */ + fallthru; case 2: v2 = fastgetattr(tuple, cc_keyno[1], cc_tupdesc, &isNull); Assert(!isNull); - /* FALLTHROUGH */ + fallthru; case 1: v1 = fastgetattr(tuple, cc_keyno[0], diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index c9be886de26e..f17d1a75dcb9 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -1714,7 +1714,6 @@ trigger_enabled(Oid triggerid) switch (tgenabled) { case TRIGGER_FIRES_ON_ORIGIN: - /* fallthrough */ /* * FIXME: we should probably return false when * SessionReplicationRole isn't SESSION_REPLICATION_ROLE_ORIGIN, diff --git a/src/backend/utils/datumstream/datumstream.c b/src/backend/utils/datumstream/datumstream.c index 988077fc7b82..1b78432c556f 100644 --- a/src/backend/utils/datumstream/datumstream.c +++ b/src/backend/utils/datumstream/datumstream.c @@ -178,7 +178,7 @@ datumstreamread_getlarge(DatumStreamRead * acc, Datum *datum, bool *null) acc->largeObjectState = DatumStreamLargeObjectState_Consumed; /* Fall below to ~_Consumed. */ - /* fallthrough */ + fallthru; case DatumStreamLargeObjectState_Consumed: { diff --git a/src/backend/utils/datumstream/datumstreamblock.c b/src/backend/utils/datumstream/datumstreamblock.c index 4b6e588e7715..f057baff954b 100755 --- a/src/backend/utils/datumstream/datumstreamblock.c +++ b/src/backend/utils/datumstream/datumstreamblock.c @@ -3476,7 +3476,6 @@ DatumStreamBlockWrite_PutDense( return -1; case DELTA_COMPRESSION_NOT_APPLIED: break; - /* FALL through */ } } diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index 38a0dea20b54..29f3ebb978e2 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -1396,7 +1396,6 @@ build_function_result_tupdesc_d(char prokind, /* input and output */ case PROARGMODE_INOUT: - /* fallthrough */ /* output modes */ case PROARGMODE_OUT: diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index b36606355123..a00b3c53d56c 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -1039,7 +1039,6 @@ hash_search_with_hash_value(HTAB *hashp, return NULL; case HASH_ENTER_NULL: - /* FALL THRU */ case HASH_ENTER: /* Return existing element if found, else create one */ diff --git a/src/backend/utils/hyperloglog/gp_hyperloglog.c b/src/backend/utils/hyperloglog/gp_hyperloglog.c index 7d3c879ec2a7..2bd14c0999f8 100644 --- a/src/backend/utils/hyperloglog/gp_hyperloglog.c +++ b/src/backend/utils/hyperloglog/gp_hyperloglog.c @@ -908,17 +908,17 @@ GpMurmurHash64A (const void * key, int len, unsigned int seed) switch(len & 7) { case 7: h ^= (uint64_t)data[6] << 48; - /* fallthrough */ + fallthru; case 6: h ^= (uint64_t)data[5] << 40; - /* fallthrough */ + fallthru; case 5: h ^= (uint64_t)data[4] << 32; - /* fallthrough */ + fallthru; case 4: h ^= (uint64_t)data[3] << 24; - /* fallthrough */ + fallthru; case 3: h ^= (uint64_t)data[2] << 16; - /* fallthrough */ + fallthru; case 2: h ^= (uint64_t)data[1] << 8; - /* fallthrough */ + fallthru; case 1: h ^= (uint64_t)data[0]; h *= m; }; diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c index 68f76aa8cb82..9e9a8356dfd4 100644 --- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c +++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c @@ -370,8 +370,6 @@ CNStoBIG5(unsigned short cns, unsigned char lc) if (b1c4[i][1] == cns) return b1c4[i][0]; } - default: - break; } return big5; } diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index 1b5ce1740c0f..78f2d91feacb 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -1516,12 +1516,12 @@ pg_utf8_islegal(const unsigned char *source, int length) a = source[3]; if (a < 0x80 || a > 0xBF) return false; - /* FALL THRU */ + fallthru; case 3: a = source[2]; if (a < 0x80 || a > 0xBF) return false; - /* FALL THRU */ + fallthru; case 2: a = source[1]; switch (*source) @@ -1547,7 +1547,7 @@ pg_utf8_islegal(const unsigned char *source, int length) return false; break; } - /* FALL THRU */ + fallthru; case 1: a = *source; if (a >= 0x80 && a < 0xC2) @@ -1623,7 +1623,7 @@ pg_utf8_increment(unsigned char *charptr, int length) charptr[3]++; break; } - /* FALL THRU */ + fallthru; case 3: a = charptr[2]; if (a < 0xBF) @@ -1631,7 +1631,7 @@ pg_utf8_increment(unsigned char *charptr, int length) charptr[2]++; break; } - /* FALL THRU */ + fallthru; case 2: a = charptr[1]; switch (*charptr) @@ -1651,7 +1651,7 @@ pg_utf8_increment(unsigned char *charptr, int length) charptr[1]++; break; } - /* FALL THRU */ + fallthru; case 1: a = *charptr; if (a == 0x7F || a == 0xDF || a == 0xEF || a == 0xF4) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 590568db1e14..2f734b0fb26a 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -7129,7 +7129,7 @@ set_config_option(const char *name, const char *value, return 0; } /* fall through to process the same as PGC_BACKEND */ - /* FALLTHROUGH */ + fallthru; case PGC_BACKEND: if (context == PGC_SIGHUP) { @@ -8585,7 +8585,7 @@ ExecSetVariableStmt(VariableSetStmt *stmt, bool isTopLevel) case VAR_SET_DEFAULT: if (stmt->is_local) WarnNoTransactionBlock(isTopLevel, "SET LOCAL"); - /* fall through */ + fallthru; case VAR_RESET: if (strcmp(stmt->name, "transaction_isolation") == 0 && Gp_role != GP_ROLE_EXECUTE) diff --git a/src/backend/utils/resscheduler/resscheduler.c b/src/backend/utils/resscheduler/resscheduler.c index 424cc2ef8eec..e0c89ba7c042 100644 --- a/src/backend/utils/resscheduler/resscheduler.c +++ b/src/backend/utils/resscheduler/resscheduler.c @@ -579,7 +579,7 @@ ResLockPortal(Portal portal, QueryDesc *qDesc) break; } } - /* fallthrough */ + fallthru; case T_SelectStmt: diff --git a/src/backend/utils/sort/tuplestore.c b/src/backend/utils/sort/tuplestore.c index c367244b0b5c..fdd6f4422482 100644 --- a/src/backend/utils/sort/tuplestore.c +++ b/src/backend/utils/sort/tuplestore.c @@ -1067,7 +1067,7 @@ tuplestore_gettuple(Tuplestorestate *state, bool forward, (errcode_for_file_access(), errmsg("could not seek in tuplestore temporary file"))); state->status = TSS_READFILE; - /* FALLTHROUGH */ + fallthru; case TSS_READFILE: *should_free = true; diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 0728fa0fbabf..1917f13b4df7 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -16431,7 +16431,7 @@ dumpExternal(Archive *fout, const TableInfo *tbinfo, PQExpBuffer q, PQExpBuffer * DROP must be fully qualified in case same name appears in * pg_catalog */ - appendPQExpBuffer(delq, "DROP EXTERNAL TABLE %s.", + appendPQExpBuffer(delq, "DROP EXTERNAL TABLE %s;\n", qualrelname); /* Now get required information from pg_exttable */ diff --git a/src/bin/pg_rewind/pg_rewind.c b/src/bin/pg_rewind/pg_rewind.c index 0732d1e0f56a..ec4272d692ec 100644 --- a/src/bin/pg_rewind/pg_rewind.c +++ b/src/bin/pg_rewind/pg_rewind.c @@ -889,7 +889,7 @@ syncTargetDirectory(void) case FILE_ACTION_CREATE: fsync_fname(entry->path, entry->source_type == FILE_TYPE_DIRECTORY); - /* FALLTHROUGH */ + fallthru; case FILE_ACTION_REMOVE: /* * Fsync the parent directory if we either create or delete diff --git a/src/common/hashfn.c b/src/common/hashfn.c index 863056b74ca4..1b8075000f68 100644 --- a/src/common/hashfn.c +++ b/src/common/hashfn.c @@ -194,13 +194,13 @@ hash_bytes(const unsigned char *k, int keylen) { case 11: c += ((uint32) k[10] << 8); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 24); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ka[1]; @@ -208,22 +208,22 @@ hash_bytes(const unsigned char *k, int keylen) break; case 7: b += ((uint32) k[6] << 8); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 16); - /* fall through */ + fallthru; case 5: b += ((uint32) k[4] << 24); - /* fall through */ + fallthru; case 4: a += ka[0]; break; case 3: a += ((uint32) k[2] << 8); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 16); - /* fall through */ + fallthru; case 1: a += ((uint32) k[0] << 24); /* case 0: nothing left to add */ @@ -233,13 +233,13 @@ hash_bytes(const unsigned char *k, int keylen) { case 11: c += ((uint32) k[10] << 24); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 8); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ka[1]; @@ -247,22 +247,22 @@ hash_bytes(const unsigned char *k, int keylen) break; case 7: b += ((uint32) k[6] << 16); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 8); - /* fall through */ + fallthru; case 5: b += k[4]; - /* fall through */ + fallthru; case 4: a += ka[0]; break; case 3: a += ((uint32) k[2] << 16); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 8); - /* fall through */ + fallthru; case 1: a += k[0]; /* case 0: nothing left to add */ @@ -296,35 +296,35 @@ hash_bytes(const unsigned char *k, int keylen) { case 11: c += ((uint32) k[10] << 8); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 24); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += k[7]; - /* fall through */ + fallthru; case 7: b += ((uint32) k[6] << 8); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 16); - /* fall through */ + fallthru; case 5: b += ((uint32) k[4] << 24); - /* fall through */ + fallthru; case 4: a += k[3]; - /* fall through */ + fallthru; case 3: a += ((uint32) k[2] << 8); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 16); - /* fall through */ + fallthru; case 1: a += ((uint32) k[0] << 24); /* case 0: nothing left to add */ @@ -334,35 +334,35 @@ hash_bytes(const unsigned char *k, int keylen) { case 11: c += ((uint32) k[10] << 24); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 8); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ((uint32) k[7] << 24); - /* fall through */ + fallthru; case 7: b += ((uint32) k[6] << 16); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 8); - /* fall through */ + fallthru; case 5: b += k[4]; - /* fall through */ + fallthru; case 4: a += ((uint32) k[3] << 24); - /* fall through */ + fallthru; case 3: a += ((uint32) k[2] << 16); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 8); - /* fall through */ + fallthru; case 1: a += k[0]; /* case 0: nothing left to add */ @@ -433,13 +433,13 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) { case 11: c += ((uint32) k[10] << 8); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 24); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ka[1]; @@ -447,22 +447,22 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) break; case 7: b += ((uint32) k[6] << 8); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 16); - /* fall through */ + fallthru; case 5: b += ((uint32) k[4] << 24); - /* fall through */ + fallthru; case 4: a += ka[0]; break; case 3: a += ((uint32) k[2] << 8); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 16); - /* fall through */ + fallthru; case 1: a += ((uint32) k[0] << 24); /* case 0: nothing left to add */ @@ -472,13 +472,13 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) { case 11: c += ((uint32) k[10] << 24); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 8); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ka[1]; @@ -486,22 +486,22 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) break; case 7: b += ((uint32) k[6] << 16); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 8); - /* fall through */ + fallthru; case 5: b += k[4]; - /* fall through */ + fallthru; case 4: a += ka[0]; break; case 3: a += ((uint32) k[2] << 16); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 8); - /* fall through */ + fallthru; case 1: a += k[0]; /* case 0: nothing left to add */ @@ -535,35 +535,35 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) { case 11: c += ((uint32) k[10] << 8); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 24); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += k[7]; - /* fall through */ + fallthru; case 7: b += ((uint32) k[6] << 8); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 16); - /* fall through */ + fallthru; case 5: b += ((uint32) k[4] << 24); - /* fall through */ + fallthru; case 4: a += k[3]; - /* fall through */ + fallthru; case 3: a += ((uint32) k[2] << 8); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 16); - /* fall through */ + fallthru; case 1: a += ((uint32) k[0] << 24); /* case 0: nothing left to add */ @@ -573,35 +573,35 @@ hash_bytes_extended(const unsigned char *k, int keylen, uint64 seed) { case 11: c += ((uint32) k[10] << 24); - /* fall through */ + fallthru; case 10: c += ((uint32) k[9] << 16); - /* fall through */ + fallthru; case 9: c += ((uint32) k[8] << 8); - /* fall through */ + fallthru; case 8: /* the lowest byte of c is reserved for the length */ b += ((uint32) k[7] << 24); - /* fall through */ + fallthru; case 7: b += ((uint32) k[6] << 16); - /* fall through */ + fallthru; case 6: b += ((uint32) k[5] << 8); - /* fall through */ + fallthru; case 5: b += k[4]; - /* fall through */ + fallthru; case 4: a += ((uint32) k[3] << 24); - /* fall through */ + fallthru; case 3: a += ((uint32) k[2] << 16); - /* fall through */ + fallthru; case 2: a += ((uint32) k[1] << 8); - /* fall through */ + fallthru; case 1: a += k[0]; /* case 0: nothing left to add */ diff --git a/src/include/c.h b/src/include/c.h index a6b4b69cdcbe..d2b40e8b8e94 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -1211,6 +1211,20 @@ typedef union PGAlignedXLogBlock ((underlying_type) (expr)) #endif +#if defined __has_attribute + #if __has_attribute(fallthrough) + #define fallthru __attribute__((fallthrough)) + #else + #define fallthru do {} while (0) + #endif +#else + /* + * This is a fallback option for those compilers which don't support + * "fallthrough" attribute. If that's the case, then do nothing. + */ + #define fallthru do {} while (0) +#endif + /* ---------------------------------------------------------------- * Section 9: system-specific hacks * diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index ca0728404aac..6f90c51d4494 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -184,7 +184,7 @@ DecodeISO8601Interval(char *str, continue; } /* Else fall through to extended alternative format */ - /* FALLTHROUGH */ + fallthru; case '-': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) @@ -263,7 +263,7 @@ DecodeISO8601Interval(char *str, return 0; } /* Else fall through to extended alternative format */ - /* FALLTHROUGH */ + fallthru; case ':': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) @@ -391,7 +391,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */ tmask = DTK_M(TZ); break; } - /* FALL THROUGH */ + fallthru; case DTK_DATE: case DTK_NUMBER: diff --git a/src/interfaces/ecpg/preproc/ecpg.c b/src/interfaces/ecpg/preproc/ecpg.c index e6adaf635540..c5cd12ce39b1 100644 --- a/src/interfaces/ecpg/preproc/ecpg.c +++ b/src/interfaces/ecpg/preproc/ecpg.c @@ -190,7 +190,7 @@ main(int argc, char *const argv[]) case 'h': header_mode = true; /* this must include "-c" to make sense, so fall through */ - /* FALLTHROUGH */ + fallthru; case 'c': auto_create_c = true; break; diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index dd4db1115059..4b79ef2baea5 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -383,7 +383,7 @@ pqsecure_raw_write(PGconn *conn, const void *ptr, size_t len) REMEMBER_EPIPE(spinfo, true); #ifdef ECONNRESET - /* FALL THRU */ + fallthru; case ECONNRESET: #endif diff --git a/src/pl/plperl/plperl.h b/src/pl/plperl/plperl.h index 8dc181335a88..8c893c23501a 100644 --- a/src/pl/plperl/plperl.h +++ b/src/pl/plperl/plperl.h @@ -82,7 +82,19 @@ */ #define PERL_NO_GET_CONTEXT #include "EXTERN.h" -#include "perl.h" +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wimplicit-fallthrough" + #include "perl.h" + #pragma clang diagnostic pop +#elif defined(__GNUC__) + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wimplicit-fallthrough" + #include "perl.h" + #pragma GCC diagnostic pop +#else + #include "perl.h" +#endif /* * We want to include XSUB.h only within .xs files, because on some platforms diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index e007f09f4370..5fe7a1147eae 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -2425,7 +2425,7 @@ plpgsql_add_initdatums(int **varnos) case PLPGSQL_DTYPE_VAR: case PLPGSQL_DTYPE_REC: (*varnos)[n++] = plpgsql_Datums[i]->dno; - + break; default: break; } diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index ad5be851a17c..964db47bd235 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3203,7 +3203,7 @@ exec_stmt_return(PLpgSQL_execstate *estate, PLpgSQL_stmt_return *stmt) /* fulfill promise if needed, then handle like regular var */ plpgsql_fulfill_promise(estate, (PLpgSQL_var *) retvar); - /* FALL THRU */ + fallthru; case PLPGSQL_DTYPE_VAR: { @@ -3349,7 +3349,7 @@ exec_stmt_return_next(PLpgSQL_execstate *estate, /* fulfill promise if needed, then handle like regular var */ plpgsql_fulfill_promise(estate, (PLpgSQL_var *) retvar); - /* FALL THRU */ + fallthru; case PLPGSQL_DTYPE_VAR: { @@ -5463,7 +5463,7 @@ exec_eval_datum(PLpgSQL_execstate *estate, /* fulfill promise if needed, then handle like regular var */ plpgsql_fulfill_promise(estate, (PLpgSQL_var *) datum); - /* FALL THRU */ + fallthru; case PLPGSQL_DTYPE_VAR: { diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 00ebe29d61d4..de0a104c2899 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -2454,7 +2454,7 @@ pltcl_process_SPI_result(Tcl_Interp *interp, break; } /* fall through for utility returning tuples */ - /* FALLTHROUGH */ + fallthru; case SPI_OK_SELECT: case SPI_OK_INSERT_RETURNING: diff --git a/src/port/glob.c b/src/port/glob.c index 9fab8b827d64..ea79638e1cd8 100644 --- a/src/port/glob.c +++ b/src/port/glob.c @@ -333,7 +333,7 @@ globexp2(ptr, pattern, pglob, rv) i--; break; } - /* FALLTHROUGH */ + fallthru; case COMMA: if (i && *pm == COMMA) break; diff --git a/src/port/snprintf.c b/src/port/snprintf.c index df8745d4f12b..5acd931b3075 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -465,7 +465,7 @@ dopr(PrintfTarget *target, const char *format, va_list args) /* set zero padding if no nonzero digits yet */ if (accum == 0 && !pointflag) zpad = '0'; - /* FALL THRU */ + fallthru; case '1': case '2': case '3': diff --git a/src/timezone/zic.c b/src/timezone/zic.c index 0ea6ead2db3a..b8d9cf868867 100644 --- a/src/timezone/zic.c +++ b/src/timezone/zic.c @@ -1393,19 +1393,19 @@ gethms(char const *string, char const *errstring) break; case 8: ok = '0' <= xr && xr <= '9'; - /* fallthrough */ + fallthru; case 7: ok &= ssx == '.'; if (ok && noise) warning(_("fractional seconds rejected by" " pre-2018 versions of zic")); - /* fallthrough */ + fallthru; case 5: ok &= mmx == ':'; - /* fallthrough */ + fallthru; case 3: ok &= hhx == ':'; - /* fallthrough */ + fallthru; case 1: break; }