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

-Wcstring-format-directive breaks existing code #32

Open
jakebromberg opened this issue Jun 6, 2017 · 0 comments
Open

-Wcstring-format-directive breaks existing code #32

jakebromberg opened this issue Jun 6, 2017 · 0 comments

Comments

@jakebromberg
Copy link

jakebromberg commented Jun 6, 2017

I have a custom logging function, defined as follows:
FOUNDATION_EXPORT void MyLogger(NSString *format, ...) NS_FORMAT_FUNCTION(1, 2);

When I call the function like so MyLogger(@"Error: stuff, %s", __PRETTY_FUNCTION__) I get following the clang diagnostic:
Using %s directive in CFString which is being passed as a formatting argument to the formatting CFfunction
This seems related to this change

The warning does not seem valid, since the type of the argument is known at compile time, even though the parameter is a va_list.

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

No branches or pull requests

1 participant