Annotate NSBundle localized string function with NS_FORMAT_ARGUMENT.

This commit is contained in:
Frederik Seiffert 2021-11-11 16:41:50 +01:00
parent b55ee6b0c5
commit 87783e2513
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