Merge pull request #217 from gnustep/nsbundle-format-argument

Annotate NSBundle localized string function with NS_FORMAT_ARGUMENT
This commit is contained in:
rfm 2021-11-17 09:51:32 +00:00 committed by GitHub
commit 73a21f4553
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2021-11-11 Frederik Seiffert <frederik@algoriddim.com>
* Headers/Foundation/NSBundle.h:
Annotate NSBundle localized string function with NS_FORMAT_ARGUMENT.
2021-09-20 Frederik Seiffert <frederik@algoriddim.com>
* Source/NSFileManager.m:

View file

@ -345,7 +345,7 @@ GS_EXPORT_CLASS
*/
- (NSString*) localizedStringForKey: (NSString*)key
value: (NSString*)value
table: (NSString*)tableName;
table: (NSString*)tableName NS_FORMAT_ARGUMENT(1);
/** Returns the absolute path to the resources directory of the bundle. */
- (NSString*) resourcePath;

View file

@ -423,7 +423,7 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
#if defined(__clang__) || GS_GCC_MINREQ(4,2)
# define NS_FORMAT_ARGUMENT(A) __attribute__((format_arg(A)))
#else
# define NS_FORMAT_ARGUMENT(F,A)
# define NS_FORMAT_ARGUMENT(A)
#endif
#endif