-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[collectd 6] Fix some gcc warnings with more strict checks #3970
[collectd 6] Fix some gcc warnings with more strict checks #3970
Conversation
If you want some of the commits to be moved to another PR or dropped, just tell which ones. PS. If somebody wants to do similar thing for rest of collectd code, I've filed #3969 for some additional issues in plugins that this does not handle. |
@mrunge could you apply v5 fix for this CI issue also to v6 branch? |
Yes, of course. |
Proposed the change here: #3972 |
"format_stackdriver" was migrated over year ago.
* Properly initialize complex struct * Fix signed vs unsigned comparisons * Tell compiler which args are expected to be unused Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.
* Fix unused arguments reported by: "-O3 -Werror -Wall -Wextra -Wformat-security" * Fix obsolete comment to match MHD docs: https://www.gnu.org/software/libmicrohttpd/ ("Queueing responses" section) https://git.gnunet.org/libmicrohttpd.git/tree/src/include/microhttpd.h#n2398 * Fix use after free reported by Klocwork, "prom_fam" cannot be used after it's been freed
Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.
Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.
Based on "-O3 -Werror -Wall -Wextra -Wformat-security" output.
Apparently CI has changed since this code was added to collectd.
5139dc7
to
8fb7c6b
Compare
Rebased to latest v6 branch to get tests passing. It might be better to merge v5 version of these fixes (#3917) first to make sure these branches do not get out of sync. |
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.
thank you, looks good
Used "Fix" label because some of the warnings were actually visible to users as build errors. |
ChangeLog: Build: Fix some gcc warnings with more strict checks
Fixes are based on "-O3 -Werror -Wall -Wextra -Wformat-security" output, and partly shared with the v5 fixes in #3917: