From ffeff426a2ac253d77b2d3fa2aef3fc72bcc688b Mon Sep 17 00:00:00 2001 From: theraven Date: Fri, 31 Dec 2010 14:03:45 +0000 Subject: [PATCH] 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 --- Headers/Foundation/NSBundle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Headers/Foundation/NSBundle.h b/Headers/Foundation/NSBundle.h index bb2f70ef7..a7a94f4d5 100644 --- a/Headers/Foundation/NSBundle.h +++ b/Headers/Foundation/NSBundle.h @@ -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;