Skip to content

Quiet new gcc implicit-fallthrough warnings, and some minor Java lint#335

Merged
jcflack merged 2 commits intoREL1_6_STABLEfrom
chore/REL1_6_STABLE/fallthrough
Nov 26, 2020
Merged

Quiet new gcc implicit-fallthrough warnings, and some minor Java lint#335
jcflack merged 2 commits intoREL1_6_STABLEfrom
chore/REL1_6_STABLE/fallthrough

Conversation

@jcflack
Copy link
Contributor

@jcflack jcflack commented Nov 25, 2020

Travis builds against Linux PG13 were showing gcc invoked with -Wimplicit-fallthrough=3, so quiet the warnings that result. I cannot explain why gcc is not respecting the pg_unreachable built into elog(ERROR but does respect a pg_unreachable added right there in the code.

CI logs indicate some PG 13 builds, anyway, are giving
-Wimplicit-fallthrough=3 to gcc. The gcc docs say with =3, a
/*FALLTHROUGH*/ comment should be recognized.

Warnings are also being generated for a switch in Type.c where
they should not be: elog(ERROR is already marked with pg_unreachable
in elog.h. I wonder whether adding an explicit pg_unreachable
will work any better.
Not strictly related to the fallthrough business, but of the
general nature of lint, and hardly worth a pull request of its own.
@jcflack jcflack merged commit fd125b0 into REL1_6_STABLE Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant