diff options
author | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-26 20:30:11 +0000 |
---|---|---|
committer | gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2012-07-26 20:30:11 +0000 |
commit | ab9b65eabb4860dac3d4524b9394903f9e1656dc (patch) | |
tree | 55f41fb197379ab34af6f7c6aad38a325be3470c /UnitTesting/GTMUnitTestDevLog.m | |
parent | 3b8d77f8b92ae1eade001c2e45af3db7b7fcf7d4 (diff) |
[Author: dmaclach]
Fix up another case of bad format string handling by various versions of Xcode.
R=thomasvl
DELTA=15 (15 added, 0 deleted, 0 changed)
Diffstat (limited to 'UnitTesting/GTMUnitTestDevLog.m')
-rw-r--r-- | UnitTesting/GTMUnitTestDevLog.m | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/UnitTesting/GTMUnitTestDevLog.m b/UnitTesting/GTMUnitTestDevLog.m index dbc6a12..fd90396 100644 --- a/UnitTesting/GTMUnitTestDevLog.m +++ b/UnitTesting/GTMUnitTestDevLog.m @@ -22,6 +22,16 @@ #import "GTMRegex.h" #import "GTMSenTestCase.h" +#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 file. We reenable it at the end. +#pragma GCC diagnostic ignored "-Wmissing-format-attribute" +#endif // !__clang__ + #if !GTM_IPHONE_SDK // Add support for grabbing messages from Carbon. #import <CoreServices/CoreServices.h> @@ -281,3 +291,8 @@ casesOfPattern:(NSString*)format } @end + +#if !defined(__clang__) && (__GNUC__*10+__GNUC_MINOR__ >= 42) +// See comment at top of file. +#pragma GCC diagnostic error "-Wmissing-format-attribute" +#endif // !__clang__ |