From bcb12fa0f651f7de3a10f4535ed856e52b1c3f62 Mon Sep 17 00:00:00 2001 From: shiqian Date: Fri, 1 Aug 2008 19:04:48 +0000 Subject: Fixes the definition of GTEST_ATTRIBUTE_UNUSED and make the tests pass in opt mode. --- include/gtest/internal/gtest-port.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/gtest') diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 1b7c6a73..8dbc2d03 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -249,11 +249,11 @@ // struct Foo { // Foo() { ... } // } GTEST_ATTRIBUTE_UNUSED; -#if defined(GTEST_OS_WINDOWS) || (defined(GTEST_OS_LINUX) && defined(SWIG)) -#define GTEST_ATTRIBUTE_UNUSED -#else +#if defined(__GNUC__) && !defined(COMPILER_ICC) #define GTEST_ATTRIBUTE_UNUSED __attribute__ ((unused)) -#endif // GTEST_OS_WINDOWS || (GTEST_OS_LINUX && SWIG) +#else +#define GTEST_ATTRIBUTE_UNUSED +#endif // A macro to disallow the evil copy constructor and operator= functions // This should be used in the private: declarations for a class. -- cgit v1.2.3