Skip to content

make: always set -Wno-implicit-fallthrough#8603

Merged
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
kaspar030:disable_fallthrough_warning
Feb 20, 2018
Merged

make: always set -Wno-implicit-fallthrough#8603
jnohlgard merged 1 commit intoRIOT-OS:masterfrom
kaspar030:disable_fallthrough_warning

Conversation

@kaspar030
Copy link
Copy Markdown
Contributor

Contribution description

gcc 7 introduced a new warning for uncommented implicit switch/case fallthroughs. As we enable all plus extra warnings, gcc 7 stumbles over a couple of those in our codebase.

There have been numerous PR's fixing remaining fallthrough warnings, mostly in packages. Still, many are left.

Ideally we'd fix them all before CI is switching to gcc 7. Unfortunately, somehow the ppa's used within the RIOT Dockerfile now default to a newer gcc7 arm toolchain, thus forcing our hand...

I propose just disabling the warning for now, globally, as this PR does.

@kaspar030 kaspar030 added Area: build system Area: Build system CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Area: CI Area: Continuous Integration of RIOT components labels Feb 20, 2018
@kaspar030 kaspar030 requested a review from jnohlgard February 20, 2018 14:50
@jnohlgard
Copy link
Copy Markdown
Member

Can't we make a push on the fixing PRs instead? #8265
At least not hide the warnings, it would be better to just disable the error: -Wno-error=implicit-fallthrough

@kaspar030
Copy link
Copy Markdown
Contributor Author

Can't we make a push on the fixing PRs instead? #8265

Ah, wasn't aware of that PR. Not much to go it seems!

Thing is, every murdock slave that (for whatever reason) restarts now will pull the newest container from docker hub, which currently contains ARM gcc 7.
How about we disable the fallthroughs for now, and when all workers are at gcc7, open a new PR re-enabling the error, which we can then use to find&fix remaining warnings?

I can manually disable the one worker that has gcc7 now, but it would only be a matter of time until another one updates. Pinning gcc6 into the Dockerfile, no idea how to do that.

@jnohlgard
Copy link
Copy Markdown
Member

I did a local compile check and there are some places which have not been reported yet, so I guess we need to disable the errors for now. We do need to bring fixing the errors to a high priority to avoid more warnings slipping past while the errors are disabled.

Copy link
Copy Markdown
Member

@jnohlgard jnohlgard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, as a temporary measure.

@jnohlgard jnohlgard merged commit 278ac29 into RIOT-OS:master Feb 20, 2018
@jnohlgard
Copy link
Copy Markdown
Member

@kaspar030

How about we disable the fallthroughs for now, and when all workers are at gcc7, open a new PR re-enabling the error, which we can then use to find&fix remaining warnings?

Please provide such a PR once you have updated to CI workers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: CI Area: Continuous Integration of RIOT components CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants