diff options
| author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-04-03 00:11:11 +0000 | 
|---|---|---|
| committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-04-03 00:11:11 +0000 | 
| commit | 0da92aaf7f696ebfa2374247ae9010dacbc057fc (patch) | |
| tree | e51b32bc72e72aebe1f716e626fdfe84e0339dd0 /include/gtest | |
| parent | 5f7c33d39cf2bc73559e1f33e5907dab41faa3a2 (diff) | |
| download | googletest-0da92aaf7f696ebfa2374247ae9010dacbc057fc.tar.gz googletest-0da92aaf7f696ebfa2374247ae9010dacbc057fc.tar.bz2 googletest-0da92aaf7f696ebfa2374247ae9010dacbc057fc.zip  | |
Fixes the comment about GTEST_ATTRIBUTE_UNUSED_.
Diffstat (limited to 'include/gtest')
| -rw-r--r-- | include/gtest/internal/gtest-port.h | 9 | 
1 files changed, 6 insertions, 3 deletions
diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 054851bc..97736314 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -96,8 +96,8 @@  //  // Macros for basic C++ coding:  //   GTEST_AMBIGUOUS_ELSE_BLOCKER_ - for disabling a gcc warning. -//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances don't have to -//                              be used. +//   GTEST_ATTRIBUTE_UNUSED_  - declares that a class' instances or a +//                              variable don't have to be used.  //   GTEST_DISALLOW_COPY_AND_ASSIGN_ - disables copy ctor and operator=.  //   GTEST_MUST_USE_RESULT_   - declares that a function's result must be used.  // @@ -439,7 +439,7 @@  #define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0:  // NOLINT  #endif -// Use this annotation at the end of a struct / class definition to +// Use this annotation at the end of a struct/class definition to  // prevent the compiler from optimizing away instances that are never  // used.  This is useful when all interesting logic happens inside the  // c'tor and / or d'tor.  Example: @@ -447,6 +447,9 @@  //   struct Foo {  //     Foo() { ... }  //   } GTEST_ATTRIBUTE_UNUSED_; +// +// Also use it after a variable or parameter declaration to tell the +// compiler the variable/parameter does not have to be used.  #if defined(__GNUC__) && !defined(COMPILER_ICC)  #define GTEST_ATTRIBUTE_UNUSED_ __attribute__ ((unused))  #else  | 
