Skip to content

silence gcc fallthrough warnings#197

Open
fireice-uk wants to merge 1 commit into
albertodemichelis:masterfrom
fireice-uk:fallthrough-fix
Open

silence gcc fallthrough warnings#197
fireice-uk wants to merge 1 commit into
albertodemichelis:masterfrom
fireice-uk:fallthrough-fix

Conversation

@fireice-uk

@fireice-uk fireice-uk commented Sep 15, 2019

Copy link
Copy Markdown

Adding this magic comment will stop gcc from crying out on default settings. For more info, see:

-Wimplicit-fallthrough=n section in

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

NOTE: I assume the four uncommented fallthroughs are intentional - I did not verify code correctness.

@zeromus

zeromus commented Sep 17, 2019

Copy link
Copy Markdown
Contributor

This is gross. you should use attribute((fallthrough)) instead after defining it to something else with a GNUC check.

@fireice-uk

Copy link
Copy Markdown
Author

Indeed, I'm just taking the path of least resistance here. I'm happy to rewrite to whatever attribute system is requested (if we are going to go that route defining one for clang might be pointful).

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.

2 participants