-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
fixed some problems, when compiling with very strict compile options #13
base: master
Are you sure you want to change the base?
Conversation
Hi all, you can think of this fix as a sort of code-style-correction, But as this projects code will be bound into other code by an #include directive, it is more than that. If you work on a project, which demands very strict compile options (-Wall -Wextra -Wshadow -Werror), as i do, you have the problem, that the code will not compile, without this fix or without another work around. greetings |
Thanks @BruceBlank. Sorry for the delay. I understand your case. However, code convention is there first for readability. I don't want to change the code convention just to comply with one case based on one specific compiler, especially if the change is less readable or introduce another issue:
Why don't use pragma to disable warning when including |
ping @BruceBlank |
Hi, sorry for the delay: We use gcc version 4.8.5 (Ubuntu 4.8.5-1ubuntu1). greetings |
@BruceBlank What about using the following pragma to disable the warning on For instance #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wshadow"
#pragma GCC diagnostic ignored "-Wunused-variable"
#include <tap.h>
#pragma GCC diagnostic pop not all diagnostic can be ignored, but I think your case should be covered. As the doc says:
|
@toch Thank you for your advice. I will try it. |
Keep me informed. if it works, it's a nice addition to our documentation I think. |
A have split the original commit in to two: This fix will avoid warnings when compiling