diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-26 21:00:23 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-26 21:00:23 +0000 |
commit | c2c9021271efb4bac13da89bc9073bda7780f029 (patch) | |
tree | 163b052c913bf8055c14749ddff823a335fc5827 /Foundation/GTMLoggerTest.m | |
parent | ab9b65eabb4860dac3d4524b9394903f9e1656dc (diff) |
[Author: dmaclach]
Fix up final GTM issues that I know of for format.
TBR=thomasvl
DELTA=16 (16 added, 0 deleted, 0 changed)
Diffstat (limited to 'Foundation/GTMLoggerTest.m')
-rw-r--r-- | Foundation/GTMLoggerTest.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Foundation/GTMLoggerTest.m b/Foundation/GTMLoggerTest.m index c48bf65..1b421c0 100644 --- a/Foundation/GTMLoggerTest.m +++ b/Foundation/GTMLoggerTest.m @@ -58,6 +58,17 @@ @interface DumbFormatter : GTMLogBasicFormatter @end @implementation DumbFormatter + +#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 @@ -65,6 +76,11 @@ return [NSString stringWithFormat:@"DUMB [%d] %@", level, [super stringForFunc:nil withFormat:fmt valist:args level:level]]; } + +#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) +#pragma GCC diagnostic error "-Wmissing-format-attribute" +#endif // !__clang__ + @end // DumbFormatter |