[vlc-devel] [PATCH 2/3] macosx: Fix warnings for localizable format strings

epirat07 at gmail.com epirat07 at gmail.com
Tue Apr 12 12:38:58 CEST 2016


From: Marvin Scholz <epirat07 at gmail.com>

The NS_FORMAT_ARGUMENT macro is added to the localizedString function
to prevent warnings (format string is not a string literal) when
localizing format strings.
---
 modules/gui/macosx/StringUtility.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/macosx/StringUtility.h b/modules/gui/macosx/StringUtility.h
index 14eb90c..47edb94 100644
--- a/modules/gui/macosx/StringUtility.h
+++ b/modules/gui/macosx/StringUtility.h
@@ -58,7 +58,7 @@ NSImage *imageFromRes(NSString *o_id);
 
 + (VLCStringUtility *)sharedInstance;
 
-- (NSString *)localizedString:(const char *)psz;
+- (NSString *)localizedString:(const char *)psz NS_FORMAT_ARGUMENT(1);
 - (NSString *)wrapString: (NSString *)o_in_string toWidth: (int)i_width;
 - (NSString *)getCurrentTimeAsString:(input_thread_t *)p_input negative:(BOOL)b_negative;
 - (NSString *)stringForTime:(long long int)time;
-- 
2.2.1



More information about the vlc-devel mailing list