I am porting MacTrek to OS X 10.6 native (from 10.4) and i got the “Format not a string literal and format arguments” error a couple of hundred times.
Source of the problem is:
#define LLLog if([[NSUserDefaults standardUserDefaults]boolForKey:@"LLLogDisabled"]!=YES)NSLog
Apparently NSLog now expects a formatted string and not a regular string.
If you want get rid of the warning “format not a string literal and no format arguments” once and for all, you can disable the GCC warning setting “Typecheck Calls to printf/scanf” (GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO) in your target’s build settings.
or go for changing stuff like:
LLLog([NSString stringWithFormat: @"JTrekController.appendOutput %@", output]);
into:
LLLog(@"JTrekController.appendOutput %@", output);
[…] Taming Snow leopard: Format not a string literal and format arguments January 2010 3 […]