Permalink
Browse files

ignore warnings about format string not being a literal

  • Loading branch information...
aharren committed Aug 26, 2012
1 parent 928692e commit 160ff0ad6c730ef0809ffa5d9f311901b2c7bcfa
Showing with 22 additions and 0 deletions.
  1. +22 −0 LCLSystemLog.m
View
@@ -436,7 +436,18 @@ + (void)logWithIdentifier:(const char *)identifier_c level:(uint32_t)level
_LCLSystemLog_autoreleasepool_begin
// create log message
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wformat-nonliteral"
+# endif
+# endif
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+# endif
# if !__has_feature(objc_arc)
[message autorelease];
# endif
@@ -504,7 +515,18 @@ + (void)logWithIdentifier:(const char *)identifier_c lclLevel:(uint32_t)lclLevel
_LCLSystemLog_autoreleasepool_begin
// create log message
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wformat-nonliteral"
+# endif
+# endif
NSString *message = [[NSString alloc] initWithFormat:format arguments:args];
+# ifndef _LCL_NO_IGNORE_WARNINGS
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+# endif
# if !__has_feature(objc_arc)
[message autorelease];
# endif

0 comments on commit 160ff0a

Please sign in to comment.