aboutsummaryrefslogtreecommitdiff
path: root/Foundation/GTMLogger+ASL.m
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-07-26 17:30:12 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2012-07-26 17:30:12 +0000
commit777beb4f267fd5d809ce8c13ed4dea942215e020 (patch)
tree1461c9d05fae280e9f9786254c7a4d28fd01de0f /Foundation/GTMLogger+ASL.m
parent222096014fbfbe56700c98ec99cffbf87fc6ef33 (diff)
[Author: dmaclach]
Turn off warnings on gcc. Leave them on on clang. R=thomasvl DELTA=32 (30 added, 2 deleted, 0 changed)
Diffstat (limited to 'Foundation/GTMLogger+ASL.m')
-rw-r--r--Foundation/GTMLogger+ASL.m14
1 files changed, 14 insertions, 0 deletions
diff --git a/Foundation/GTMLogger+ASL.m b/Foundation/GTMLogger+ASL.m
index 58bc710..a4299dc 100644
--- a/Foundation/GTMLogger+ASL.m
+++ b/Foundation/GTMLogger+ASL.m
@@ -106,6 +106,16 @@
@implementation GTMLogASLFormatter
+#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42)
+// Some versions of GCC (4.2 and below AFAIK) aren't great about supporting
+// -Wmissing-format-attribute
+// when the function is anything more complex than foo(NSString *fmt, ...).
+// You see the error inside the function when you turn ... into va_args and
+// attempt to call another function (like vsprintf for example).
+// So we just shut off the warning for this function.
+#pragma GCC diagnostic ignored "-Wmissing-format-attribute"
+#endif // !__clang__
+
- (NSString *)stringForFunc:(NSString *)func
withFormat:(NSString *)fmt
valist:(va_list)args
@@ -116,6 +126,10 @@
[super stringForFunc:func withFormat:fmt valist:args level:level]];
}
+#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42)
+#pragma GCC diagnostic error "-Wmissing-format-attribute"
+#endif // !__clang__
+
@end // GTMLogASLFormatter