aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-02 21:06:38 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2010-09-02 21:06:38 +0000
commit3976184d34be50a1051a1018cb961b19ad61092f (patch)
treef7edca54b72a1fd4f490016da45d1e45afa3e4b7
parent246dda0c942c98bca010f6248c03b610a381f9e8 (diff)
[Author: dmaclach]
Add a GTM_UNUSED macro to deal with issue on the mailing lists. R=thomasvl DELTA=7 (7 added, 0 deleted, 0 changed)
-rw-r--r--Foundation/GTMObjectSingleton.h5
-rw-r--r--GTMDefines.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/Foundation/GTMObjectSingleton.h b/Foundation/GTMObjectSingleton.h
index 4763b68..e6ef28e 100644
--- a/Foundation/GTMObjectSingleton.h
+++ b/Foundation/GTMObjectSingleton.h
@@ -7,9 +7,9 @@
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
-//
+//
// http://www.apache.org/licenses/LICENSE-2.0
-//
+//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -66,6 +66,7 @@ static _object_name_ *z##_shared_obj_name_ = nil; \
return self; \
} \
- (id)copyWithZone:(NSZone *)zone { \
+ GTM_UNUSED(zone); \
return self; \
} \
diff --git a/GTMDefines.h b/GTMDefines.h
index c8685d9..c033d6f 100644
--- a/GTMDefines.h
+++ b/GTMDefines.h
@@ -98,6 +98,12 @@
#define GTM_EXPORT __attribute__((visibility("default")))
#endif
+// Give ourselves a consistent way of declaring something as unused. This
+// doesn't use __unused because that is only supported in gcc 4.2 and greater.
+#if !defined (GTM_UNUSED)
+#define GTM_UNUSED(x) ((void)(x))
+#endif
+
// _GTMDevLog & _GTMDevAssert
//
// _GTMDevLog & _GTMDevAssert are meant to be a very lightweight shell for