Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Annotate NSBundle localized string function with NS_FORMAT_ARGUMENT.
  • Loading branch information
triplef committed Nov 11, 2021
1 parent b55ee6b commit 87783e2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Headers/Foundation/NSBundle.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion Headers/GNUstepBase/GSVersionMacros.h
Expand Up @@ -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

Expand Down

0 comments on commit 87783e2

Please sign in to comment.