fixed some problems, when compiling with very strict compile options - #13
fixed some problems, when compiling with very strict compile options#13BruceBlank wants to merge 1 commit into
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 popnot 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