diff options
Diffstat (limited to 'src/backend/utils')
| -rw-r--r-- | src/backend/utils/adt/acl.c | 1 | ||||
| -rw-r--r-- | src/backend/utils/adt/datetime.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/adt/numeric.c | 1 | ||||
| -rw-r--r-- | src/backend/utils/adt/ruleutils.c | 2 | ||||
| -rw-r--r-- | src/backend/utils/adt/timestamp.c | 19 | ||||
| -rw-r--r-- | src/backend/utils/misc/guc.c | 4 | ||||
| -rw-r--r-- | src/backend/utils/sort/tuplestore.c | 2 |
7 files changed, 28 insertions, 5 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 0cfc297b65..a45e093de7 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -5216,6 +5216,7 @@ get_rolespec_tuple(const RoleSpec *role) (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("role \"%s\" does not exist", "public"))); tuple = NULL; /* make compiler happy */ + break; default: elog(ERROR, "unexpected role type %d", role->roletype); diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 3f0f65c295..633fb9bf54 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -3146,7 +3146,7 @@ DecodeInterval(char **field, int *ftype, int nf, int range, * handle signed float numbers and signed year-month values. */ - /* FALL THROUGH */ + /* FALLTHROUGH */ case DTK_DATE: case DTK_NUMBER: @@ -3577,6 +3577,7 @@ DecodeISO8601Interval(char *str, continue; } /* Else fall through to extended alternative format */ + /* FALLTHROUGH */ case '-': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) @@ -3655,6 +3656,7 @@ DecodeISO8601Interval(char *str, return 0; } /* Else fall through to extended alternative format */ + /* FALLTHROUGH */ case ':': /* ISO 8601 4.4.3.3 Alternative Format, * Extended */ if (havefield) diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 6f40072971..c56d5afcb3 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -1522,6 +1522,7 @@ width_bucket_numeric(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION), errmsg("lower bound cannot equal upper bound"))); + break; /* bound1 < bound2 */ case -1: diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index 74e1cd8afb..065238b0fe 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -7481,8 +7481,8 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags) return false; } /* else do the same stuff as for T_SubLink et al. */ - /* FALL THROUGH */ } + /* FALLTHROUGH */ case T_SubLink: case T_NullTest: diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 103f91ae62..265b1db7f6 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -3830,12 +3830,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 */ 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 */ case DTK_DECADE: /* see comments in timestamptz_trunc */ if (val != DTK_MILLENNIUM && val != DTK_CENTURY) @@ -3845,18 +3847,25 @@ timestamp_trunc(PG_FUNCTION_ARGS) else tm->tm_year = -((8 - (tm->tm_year - 1)) / 10) * 10; } + /* FALL THRU */ case DTK_YEAR: tm->tm_mon = 1; + /* FALL THRU */ case DTK_QUARTER: tm->tm_mon = (3 * ((tm->tm_mon - 1) / 3)) + 1; + /* FALL THRU */ case DTK_MONTH: tm->tm_mday = 1; + /* FALL THRU */ case DTK_DAY: tm->tm_hour = 0; + /* FALL THRU */ case DTK_HOUR: tm->tm_min = 0; + /* FALL THRU */ case DTK_MINUTE: tm->tm_sec = 0; + /* FALL THRU */ case DTK_SECOND: fsec = 0; break; @@ -4072,28 +4081,36 @@ interval_trunc(PG_FUNCTION_ARGS) { switch (val) { - /* fall through */ case DTK_MILLENNIUM: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 1000) * 1000; + /* FALL THRU */ case DTK_CENTURY: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 100) * 100; + /* FALL THRU */ case DTK_DECADE: /* caution: C division may have negative remainder */ tm->tm_year = (tm->tm_year / 10) * 10; + /* FALL THRU */ case DTK_YEAR: tm->tm_mon = 0; + /* FALL THRU */ case DTK_QUARTER: tm->tm_mon = 3 * (tm->tm_mon / 3); + /* FALL THRU */ case DTK_MONTH: tm->tm_mday = 0; + /* FALL THRU */ case DTK_DAY: tm->tm_hour = 0; + /* FALL THRU */ case DTK_HOUR: tm->tm_min = 0; + /* FALL THRU */ case DTK_MINUTE: tm->tm_sec = 0; + /* FALL THRU */ case DTK_SECOND: fsec = 0; break; diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 6eae3d62cc..e1c51c5481 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -5391,6 +5391,7 @@ AtEOXact_GUC(bool isCommit, int nestLevel) { case GUC_SAVE: Assert(false); /* can't get here */ + break; case GUC_SET: /* next level always becomes SET */ @@ -6257,7 +6258,8 @@ set_config_option(const char *name, const char *value, name))); return 0; } - /* FALL THRU to process the same as PGC_BACKEND */ + /* fall through to process the same as PGC_BACKEND */ + /* FALLTHROUGH */ case PGC_BACKEND: if (context == PGC_SIGHUP) { diff --git a/src/backend/utils/sort/tuplestore.c b/src/backend/utils/sort/tuplestore.c index d602753ca9..5560a3e1f6 100644 --- a/src/backend/utils/sort/tuplestore.c +++ b/src/backend/utils/sort/tuplestore.c @@ -972,7 +972,7 @@ tuplestore_gettuple(Tuplestorestate *state, bool forward, (errcode_for_file_access(), errmsg("could not seek in tuplestore temporary file: %m"))); state->status = TSS_READFILE; - /* FALL THRU into READFILE case */ + /* FALLTHROUGH */ case TSS_READFILE: *should_free = true; |
