Page MenuHomePhabricator

Merge #10489: build: silence gcc7's implicit fallthrough warning
ClosedPublic

Authored by jasonbcox on May 7 2019, 02:52.

Details

Summary

cf390df build: silence gcc7's implicit fallthrough warning (Cory Fields)

Tree-SHA512: 330a4258161529c6e7af34ba3dc9703c24d897d7fff317c078441405c4546c7236e260603181001954b214d4640ad09ed3d34d3b518be991cb1712a02bcaa1d9

Backport of Core PR10489
https://github.com/bitcoin/bitcoin/pull/10489/files
I noticed these fallthrough warnings appearing repeatedly due to tinyformat as the original PR describes.
Although I don't 100% agree that it is good to always silence this warning, it is proving to add
cognitive load when digging through real build error messages. I'll leave this diff up for discussion.

Test Plan
make # no longer vomits warnings related to fallthrough
ninja # does not show fallthrough warnings
cmake -GNinja -DEXTRA_WARNINGS=1 ..
ninja # vomits fallthrough warnings as expected

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested changes to this revision.May 7 2019, 07:04

Can you also add it to src/CMakeLists.txt ?

This revision now requires changes to proceed.May 7 2019, 07:04

Rebase + added to CMake build

Fabien requested changes to this revision.May 9 2019, 06:35
Fabien added inline comments.
src/CMakeLists.txt
92 ↗(On Diff #8537)

We want to remove it because it is part of Wextra since gcc7. No need to enable it first.

This revision now requires changes to proceed.May 9 2019, 06:35

Removed enabling implicit-fallthrough as the default

This revision is now accepted and ready to land.May 9 2019, 16:13