diff options
author | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-08-01 19:04:48 +0000 |
---|---|---|
committer | shiqian <shiqian@861a406c-534a-0410-8894-cb66d6ee9925> | 2008-08-01 19:04:48 +0000 |
commit | bcb12fa0f651f7de3a10f4535ed856e52b1c3f62 (patch) | |
tree | 155a3d8bd238349da5c4f883ff100faaeeaf6bfb /include/gtest/internal/gtest-port.h | |
parent | bf9b4b48dc65adc2edd44175f77b4a7363c59234 (diff) | |
download | googletest-bcb12fa0f651f7de3a10f4535ed856e52b1c3f62.tar.gz googletest-bcb12fa0f651f7de3a10f4535ed856e52b1c3f62.tar.bz2 googletest-bcb12fa0f651f7de3a10f4535ed856e52b1c3f62.zip |
Fixes the definition of GTEST_ATTRIBUTE_UNUSED and make the tests pass in opt mode.
Diffstat (limited to 'include/gtest/internal/gtest-port.h')
-rw-r--r-- | include/gtest/internal/gtest-port.h | 8 |
1 files changed, 4 insertions, 4 deletions
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. |