-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fixed/aligned some compiler warnings #3065
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,6 +46,15 @@ | |
| # define NORETURN | ||
| #endif | ||
|
|
||
| // fallthrough | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't https://en.cppreference.com/w/cpp/language/attributes/fallthrough be preferred if available?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That is a C++-17 feature.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We not compile Cppcheck as C++17 at all so there's not really a point in adding that. Not sure if we even want to support that. @danmar What do you think?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would probably prefer to use
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. feel free to change it later. I feel I will merge this as it is.. |
||
| #if defined(__clang__) | ||
| # define FALLTHROUGH [[clang::fallthrough]] | ||
| #elif (defined(__GNUC__) && (__GNUC__ >= 7)) | ||
| # define FALLTHROUGH __attribute__((fallthrough)) | ||
| #else | ||
| # define FALLTHROUGH | ||
| #endif | ||
|
|
||
| #define REQUIRES(msg, ...) class=typename std::enable_if<__VA_ARGS__::value>::type | ||
|
|
||
| #include <string> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't it be removed instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually write this often myself.