]> git-server-git.apps.pok.os.sepia.ceph.com Git - googletest.git/commitdiff
Fix "unused variable" warning
authorGaspard Petit <gpetit@eidosmontreal.com>
Mon, 30 May 2022 15:04:54 +0000 (11:04 -0400)
committerGaspard Petit <gpetit@eidosmontreal.com>
Mon, 30 May 2022 15:04:54 +0000 (11:04 -0400)
Fix "unused variable" warning when GTEST_HAS_STREAM_REDIRECTION is set to false in gtest-port.cc

googletest/src/gtest-port.cc

index 73a1115a68d34034085d911380c05b86f957047d..7cf6d4139b0bb18c373f08fb5c8e2ec77cd68be0 100644 (file)
@@ -90,6 +90,7 @@
 namespace testing {
 namespace internal {
 
+#if GTEST_HAS_STREAM_REDIRECTION
 #if defined(_MSC_VER) || defined(__BORLANDC__)
 // MSVC and C++Builder do not provide a definition of STDERR_FILENO.
 const int kStdOutFileno = 1;
@@ -98,6 +99,7 @@ const int kStdErrFileno = 2;
 const int kStdOutFileno = STDOUT_FILENO;
 const int kStdErrFileno = STDERR_FILENO;
 #endif  // _MSC_VER
+#endif // GTEST_HAS_STREAM_REDIRECTION
 
 #if GTEST_OS_LINUX || GTEST_OS_GNU_HURD