After I added the new -Weverything to Clang’s other warning flags, I started getting this warning for all of my NSAsserts:
Varargs argument missing, but tolerated as an extension
How can I fix this or, alternatively, suppress this warning?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you really want to avoid this warning, stick a
nilas an extra argument. It appears that-Wpedanticdoesn’t like having a varargs argument with no value, so if you haveNSAssert(condition, @"static string")you’re not providing an argument for the varargs spot (NSAssertlooks likeNSAssert(condition, format, ...)). By stickingnilon the end you’re providing a value for the varargs argument but there’s no cost to it.