aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-11-17 10:00:42 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-11-17 10:00:42 +0000
commit59218cf3ff9c6d290de327220758eb84f9889bd0 (patch)
tree97b9051ea187a15cb89160578c72eed07624baf3
parent8b6fbb8fa94600574337580cd1c3d7511379b8d4 (diff)
[Author: craigwilkinson]
Fix a few warning in release mode, when _GTM* expands to not use it's arguments. R=thomasvl,sharvil APPROVED=sharvil DELTA=6 (6 added, 0 deleted, 0 changed)
-rw-r--r--UnitTesting/GTMSenTestCase.m2
-rw-r--r--UnitTesting/GTMUnitTestDevLog.m4
2 files changed, 6 insertions, 0 deletions
diff --git a/UnitTesting/GTMSenTestCase.m b/UnitTesting/GTMSenTestCase.m
index 2a644d0..5c90ae9 100644
--- a/UnitTesting/GTMSenTestCase.m
+++ b/UnitTesting/GTMSenTestCase.m
@@ -469,6 +469,8 @@ static __attribute__((constructor)) void _GTMInstallLeaks(void) {
fprintf(stderr, "Leak Checking Enabled\n");
fflush(stderr);
int ret = atexit(&_GTMRunLeaks);
+ // To avoid unused variable warning when _GTMDevAssert is stripped.
+ (void)ret;
_GTMDevAssert(ret == 0,
@"Unable to install _GTMRunLeaks as an atexit handler (%d)",
errno);
diff --git a/UnitTesting/GTMUnitTestDevLog.m b/UnitTesting/GTMUnitTestDevLog.m
index 980fb93..b35e1bb 100644
--- a/UnitTesting/GTMUnitTestDevLog.m
+++ b/UnitTesting/GTMUnitTestDevLog.m
@@ -73,6 +73,8 @@ static inline void GTMUninstallDebugAssertOutputHandler(void) {};
NSStringFromSelector(selector),
descStr,
fileName, (long)line];
+ // To avoid unused variable warning when _GTMDevLog is stripped.
+ (void)outLog;
_GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored
[NSException raise:NSInternalInconsistencyException
format:@"NSAssert raised"];
@@ -95,6 +97,8 @@ static inline void GTMUninstallDebugAssertOutputHandler(void) {};
functionName,
descStr,
fileName, (long)line];
+ // To avoid unused variable warning when _GTMDevLog is stripped.
+ (void)outLog;
_GTMDevLog(@"%@", outLog); // Don't want any percents in outLog honored
[NSException raise:NSInternalInconsistencyException
format:@"NSAssert raised"];