by ampatspell
in Code
NS_REQUIRES_NIL_TERMINATION macro can be used to warn that method’s varargs requires nil as last argument:
- (void)something:(NSString *)name, ... NS_REQUIRES_NIL_TERMINATION;
By default GCC doesn’t warn about missing nil (sentinel). To enable this warning:
-WformatAfter rebuild, the warning: missing sentinel in function call warning will be presented under each method call without nil termination.
This is reblog from my older blog @ tumblr.