Skip to content
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

write_sensu: pass literal string to ERROR() macro #1001

Merged

Conversation

mfournier
Copy link

This allows building with gcc's -Werror=format-security flag, which is
enforced when building debian packages.

See https://wiki.debian.org/Hardening

This allows building with gcc's `-Werror=format-security` flag, which is
enforced when building debian packages.

See https://wiki.debian.org/Hardening
@mfournier
Copy link
Author

Not sure this is the correct fix though. I'm a bit puzzled that gcc complained in this case, as it's supposed to abort if it encounters an attempt to modify a const.

/cc @fabricemarie

@mfournier mfournier added the build An issue with the build label Apr 12, 2015
@mfournier mfournier added this to the 5.5 milestone Apr 12, 2015
@tokkee
Copy link
Member

tokkee commented Apr 14, 2015

This looks like the right fix to me. The other options would be ERROR(%s, alloc_err) or making alloc_err a define both of which don't look better to me.

@mfournier mfournier merged commit 70df26d into collectd:master Apr 14, 2015
@mfournier
Copy link
Author

Thanks for confirming this @tokkee!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build An issue with the build
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants