[RFC] Use GNULIB's compiler warning code#378
Conversation
4623e3d to
592ecb7
Compare
|
The only two patches which have to be reviewed as part of this PR are:
The patches which this PR has been rebased atop are here because without then our CI would fail. |
592ecb7 to
fe1c055
Compare
|
I'm seeing a build failure with these patches on my machine: |
| new_end->next = NULL; | ||
| if (new_end) { | ||
| new_end->next = NULL; | ||
| } |
There was a problem hiding this comment.
Wouldn't it make sense to return an error if new_end is NULL? Or is it OK to just ignore that?
| /* If INI_PARSE_IGNORE_NON_KVP is not defined, use 0 (no effect) */ | ||
| #ifndef INI_PARSE_IGNORE_NON_KVP | ||
| #define INI_PARSE_IGNORE_NON_KVP 0 | ||
| #warning INI_PARSE_IGNORE_NON_KVP not defined. |
There was a problem hiding this comment.
@mzidek-rh does RHEL-6 ship with the newer ding-libs API? If yes, I guess this is OK, otherwise we should keep the warning..
| */ | ||
| if (recent_dom_info != NULL) { | ||
| recent_dom_info->next = NULL; | ||
| } |
There was a problem hiding this comment.
Similar to the resolv patch, I think it's better to fail explicitly than silently skip even in case of a false positive.
jhrozek
left a comment
There was a problem hiding this comment.
I would prefer explicit failure in case some check fails and we need to check with @mzidek-rh about removing the INI warning.
|
I did not review all the patches, but I do not like the removal of the INI warning. I guess we can not treat warnings as errors for all platforms. It is easy to forget that you need new ding-libs for some of the features to work properly in SSSD and if someone compiles the code for EL6 (scratch builds) this warning is a valuable piece of information. I explicitly grep for it when do some scratch builds to verify if the new ding-libs was available during compile time (not just run time). |
|
Okay. I'll re-work this PR. About merging this PR and the #371, I'm okay with that. But I'd prefer dropping the patches from there than from here (as those patches here are at least 6 months older than that ones). |
|
btw there are more warnings on RHEL-6: |
|
On Tue, Sep 12, 2017 at 9:36 PM, Jakub Hrozek ***@***.***> wrote:
btw there are more warnings on RHEL-6:
cache_req_data.o `test -f 'src/responder/common/cache_req/cache_req_data.c' || echo '/var/lib/jenkins/workspace/ci/label/rhel6/'`src/responder/common/cache_req/cache_req_data.c
cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-Wenum-compare" is valid for C++/ObjC++ but not for C
cc1: warnings being treated as errors
/var/lib/jenkins/workspace/ci/label/rhel6/src/responder/common/cache_req/cache_req_result.c: In function 'cache_req_add_result':
/var/lib/jenkins/workspace/ci/label/rhel6/src/responder/common/cache_req/cache_req_result.c:35: error: declaration of 'index' shadows a global declaration [-Wshadow]
/usr/include/string.h:489: error: shadowed declaration is here [-Wshadow]
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#378 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAG4ek0NUboT94sK1M5Tln3Fu3VUaSegks5sht0jgaJpZM4PR-L3>
.
|
fe1c055 to
7f77508
Compare
|
@jhrozek, in order to keep this PR moving ... I've decided to do not warn in case of stack-protector. I've submit the code to our internal CI and I'll post the link as soon as I get the results. This PR is rebased atop of #377. |
|
@fidencio I'm not Jakub but just file a ticket for those warnings and lets move on with this one. It's been opened a year ago, you deserve it :-) |
|
@fidencio I'm sorry this stalled, but I guess the PR needs a rebase atop master, right? At least the fixes for the warnings are present in master now.. |
|
Also, I'd like to open at least one bug to fix some of the warnings we've been ignoring so far. |
It's needed in case GNULIB's manywarnings patch gets accepted, but it's clearly a false-positive. Signed-off-by: Fabiano Fidêncio <[email protected]>
This patch is based on cabc051. Our coverage build uses -O0 but the macro _FORTIFY_SOURCE requires to be compiled with optimization. Signed-off-by: Fabiano Fidêncio <[email protected]>
As GNULIB has the 'manywarnings' module, which basically turns on every GCC warning, let's make use of it. We can easily blacklist the warnings we cannot cope with, but the main goal should be to have enabled every possible GCC warning. When new GCC warnings are created the 'manywarnings' file can be refreshed from upstream GNULIB. Compilation with -Werror is explicitly disabled for RHEL6 in our CI, as a lot of warnings show up there due to old dependencies or even as false-positives. Signed-off-by: Fabiano Fidêncio <[email protected]>
7f77508 to
ac54a2e
Compare
|
@pbrezina, @jhrozek: This PR has been updated and is ready to be reviewed & possibly merged. I've opened two issues related to this PR: https://pagure.io/SSSD/sssd/issue/3604 and https://pagure.io/SSSD/sssd/issue/3606 |
|
I've fired a CI build and I'm waiting for its results. |
|
I've decided to close this PR, there are more important things to be worked on/reviewed. |
|
I'm sorry this got stalled, does it need any rebasing? If you rebase it one more time, I will review it immediately. |
|
Same for Amit's patch. |
|
@pbrezina, thanks for the offer but there's no need, sincerely. :-) There's more important work to be done/reviewed at the moment and keeping the PR opened didn't make sense. In the future, in case someone has interest on having this merged, we can get back and talk about it. For now, I'd just keep it closed and forget about this! |
This is the 3rd tentative to have this patch reviewed. For more references, please, see: PR #50.
So, I've re-worked those patches a little bit and here is the time difference when running reconfing with the patches:
And now without:
This patch set is rebased on top of PR #377.
I really would appreciate if someone could review and give their opinion.
The reason this PR was blocked is because this time difference has been considered a "performance issue".
@jhrozek , could you take a look on this?