Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silence gcc fallthrough warnings #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fireice-uk
Copy link

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

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
Copy link
Contributor

zeromus commented Sep 17, 2019

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

@fireice-uk
Copy link
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.

None yet

2 participants