Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: 3e9744465dbe51822c7d76baca1f934d54ba9452
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2020-05-12T20:07:30Z
Releases: 13.0
Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS

Use it at level 4, a bit more restrictive than the default level, and
tweak our commanding comments to FALLTHROUGH.

(However, leave zic.c alone, since it's external code; to avoid the
warnings that would appear there, change CFLAGS for that file in the
Makefile.)

Author: Julien Rouhaud <rjuju123@gmail.com>
Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20200412081825.qyo5vwwco3fv4gdo@nol
Discussion: https://postgr.es/m/flat/E1fDenm-0000C8-IJ@gemulon.postgresql.org

Files

PathChange+/−
configure modified +91 −0
configure.in modified +2 −0
src/backend/access/heap/heapam_handler.c modified +1 −1
src/backend/catalog/dependency.c modified +1 −1
src/backend/commands/tablecmds.c modified +1 −1
src/backend/commands/trigger.c modified +1 −1
src/backend/executor/nodeHash.c modified +7 −7
src/backend/executor/nodeHashjoin.c modified +5 −5
src/backend/executor/nodeLimit.c modified +2 −2
src/backend/libpq/auth.c modified +1 −1
src/backend/optimizer/util/clauses.c modified +2 −2
src/backend/parser/parse_utilcmd.c modified +1 −1
src/backend/partitioning/partprune.c modified +4 −4
src/backend/postmaster/postmaster.c modified +3 −3
src/backend/regex/regc_pg_locale.c modified +22 −22
src/backend/replication/logical/reorderbuffer.c modified +1 −1
src/backend/replication/walreceiver.c modified +1 −1
src/backend/replication/walreceiverfuncs.c modified +1 −1
src/backend/tcop/utility.c modified +1 −1
src/backend/utils/adt/formatting.c modified +1 −1
src/backend/utils/adt/jsonb_util.c modified +1 −1
src/backend/utils/adt/timestamp.c modified +27 −27
src/backend/utils/adt/tsginidx.c modified +1 −1
src/backend/utils/hash/dynahash.c modified +1 −1
src/backend/utils/mb/mbutils.c modified +3 −3
src/backend/utils/misc/guc.c modified +1 −1
src/common/hashfn.c modified +72 −72
src/common/wchar.c modified +3 −3
src/interfaces/ecpg/pgtypeslib/interval.c modified +1 −1
src/interfaces/libpq/fe-secure.c modified +1 −1
src/pl/plpgsql/src/pl_exec.c modified +3 −3
src/port/snprintf.c modified +1 −1
src/timezone/Makefile modified +5 −0

Discussion

Cited messages not in the archive: flat/E1fDenm-0000C8-IJ@gemulon.postgresql.org