"-Weverything" puts a "Varargs argument missing, but tolerated as an extension" warning at each NSAssert

clang, cocoa, llvm, objective-c

Solution

If you really want to avoid this warning, stick a `nil` as an extra argument. It appears that `-Wpedantic` doesn't like having a varargs argument with no value, so if you have `NSAssert(condition, @"static string")` you're not providing an argument for the varargs spot (`NSAssert` looks like `NSAssert(condition, format, ...)`). By sticking `nil` on the end you're providing a value for the varargs argument but there's no cost to it.

Problem

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?

Original source