From 3e9744465dbe51822c7d76baca1f934d54ba9452 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Tue, 12 May 2020 16:01:52 -0400 Subject: Add -Wimplicit-fallthrough to CFLAGS and CXXFLAGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Author: Álvaro Herrera Reviewed-by: Tom Lane Discussion: https://postgr.es/m/20200412081825.qyo5vwwco3fv4gdo@nol Discussion: https://postgr.es/m/flat/E1fDenm-0000C8-IJ@gemulon.postgresql.org --- src/backend/utils/adt/jsonb_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/backend/utils/adt/jsonb_util.c') diff --git a/src/backend/utils/adt/jsonb_util.c b/src/backend/utils/adt/jsonb_util.c index 04b70c805b4..52ec80af045 100644 --- a/src/backend/utils/adt/jsonb_util.c +++ b/src/backend/utils/adt/jsonb_util.c @@ -637,7 +637,7 @@ pushJsonbValueScalar(JsonbParseState **pstate, JsonbIteratorToken seq, break; case WJB_END_OBJECT: uniqueifyJsonbObject(&(*pstate)->contVal); - /* fall through! */ + /* FALLTHROUGH */ case WJB_END_ARRAY: /* Steps here common to WJB_END_OBJECT case */ Assert(!scalarVal); -- cgit v1.2.3