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

Avoid GCC-7 & above compiler warning: -Wimplicit-fallthrough #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ellio167
Copy link

With current master and GCC 7 or above (GCC 9 in this specific example) I see:

$ g++-9 -Wextra  example.cpp
In file included from example.cpp:2:
edn.hpp: In function 'std::string edn::escapeQuotes(const string&)':
edn.hpp:390:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
  390 |           after += '\\';
      |                    ^~~~
edn.hpp:391:9: note: here
  391 |         default:
      |         ^~~~~~~

To avoid this, I've switched to an equivalent if() statement.

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