[vlc-commits] macosx: suppress format warnings in StringUtility
David Fuhrmann
git at videolan.org
Fri Sep 21 10:48:28 CEST 2012
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Sep 21 10:46:03 2012 +0200| [2f1fe72f986c7a408f28b0d8732ceb284ec092e3] | committer: David Fuhrmann
macosx: suppress format warnings in StringUtility
According to http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/Strings/Articles/formatSpecifiers.html
%C is the right one for unicode characters.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f1fe72f986c7a408f28b0d8732ceb284ec092e3
---
modules/gui/macosx/StringUtility.m | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/gui/macosx/StringUtility.m b/modules/gui/macosx/StringUtility.m
index d9ce027..795da0e 100644
--- a/modules/gui/macosx/StringUtility.m
+++ b/modules/gui/macosx/StringUtility.m
@@ -279,6 +279,8 @@ unsigned int CocoaKeyToVLC(unichar i_key)
theString = [theString stringByReplacingOccurrencesOfString:@"Shift" withString:@""];
theString = [theString stringByReplacingOccurrencesOfString:@"Ctrl" withString:@""];
}
+
+#pragma GCC diagnostic ignored "-Wformat"
if ([theString length] > 1) {
if ([theString rangeOfString:@"Up"].location != NSNotFound)
return [NSString stringWithFormat:@"%C", NSUpArrowFunctionKey];
@@ -334,6 +336,7 @@ unsigned int CocoaKeyToVLC(unichar i_key)
return [NSString stringWithFormat:@"%C", NSF1FunctionKey];
/* note that we don't support esc here, since it is reserved for leaving fullscreen */
}
+#pragma GCC diagnostic warning "-Wformat"
return theString;
}
More information about the vlc-commits
mailing list