Add __attribute__ ((format_arg)) to [NSBundle -localizedStringForKey:value:table:]. This informs the compiler that the output can be used anywhere that the first argument can be used, and should silence all of the non-constant format string warnings that we get anywhere that _(@"foo") or similar is used.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31804 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2010-12-31 14:03:45 +00:00
parent 62087337b0
commit 26cca7b21a

View file

@ -304,7 +304,7 @@ GS_EXPORT NSString* const NSLoadedClasses;
*/
- (NSString*) localizedStringForKey: (NSString*)key
value: (NSString*)value
table: (NSString*)tableName;
table: (NSString*)tableName __attribute__((format_arg(1)));
/** Returns the absolute path to the resources directory of the bundle. */
- (NSString*) resourcePath;