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

Disable Clang C-style variadic warnings in autosprintf #449

Merged
merged 2 commits into from
Nov 7, 2017
Merged

Disable Clang C-style variadic warnings in autosprintf #449

merged 2 commits into from
Nov 7, 2017

Conversation

benrubson
Copy link
Contributor

@benrubson benrubson commented Nov 6, 2017

Hi,

This PR helps with #427 disabling Clang C-style variadic warnings in autosprintf.

Thx 👍

For reference, the following disabled warning :

autosprintf.cpp:38:14: warning: do not define a C-style variadic function; consider using a function parameter pack or currying instead [cert-dcl50-cpp]
autosprintf::autosprintf(const char *format, ...) {
 ^

leads to :
https://www.securecoding.cert.org/confluence/display/cplusplus/DCL50-CPP.+Do+not+define+a+C-style+variadic+function

and to several implementations :
https://gist.github.com/sehe/3374327
https://github.com/tromey/typesafe-printf
https://github.com/fmtlib/fmt

@benrubson benrubson changed the title Disable Clang no-malloc warning Disable Clang C-style variadic warnings in autosprintf Nov 7, 2017
@vgough vgough self-assigned this Nov 7, 2017
Copy link
Owner

@vgough vgough left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@benrubson
Copy link
Contributor Author

Thx @vgough 👍

@benrubson benrubson merged commit 9766a6c into vgough:master Nov 7, 2017
@benrubson benrubson deleted the warn5 branch November 7, 2017 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants