Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ignore warnings about format string not being a literal

  • Loading branch information...
commit 160ff0ad6c730ef0809ffa5d9f311901b2c7bcfa 1 parent 928692e
@aharren authored
Showing with 22 additions and 0 deletions.
  1. +22 −0 LCLSystemLog.m
View
22 LCLSystemLog.m
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.