Skip to content

Commit 191ca1f

Browse files
Merge pull request #3863 from eidosmontreal:fix_unused-variable_warning
PiperOrigin-RevId: 454940948 Change-Id: Ic87dadfe9c6fc8882b0f425aa2056f0cc7a90b55
2 parents 8b521aa + fe735a6 commit 191ca1f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

googletest/src/gtest-port.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,6 @@
9090
namespace testing {
9191
namespace internal {
9292

93-
#if defined(_MSC_VER) || defined(__BORLANDC__)
94-
// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
95-
const int kStdOutFileno = 1;
96-
const int kStdErrFileno = 2;
97-
#else
98-
const int kStdOutFileno = STDOUT_FILENO;
99-
const int kStdErrFileno = STDERR_FILENO;
100-
#endif // _MSC_VER
101-
10293
#if GTEST_OS_LINUX || GTEST_OS_GNU_HURD
10394

10495
namespace {
@@ -1177,6 +1168,15 @@ static std::string GetCapturedStream(CapturedStream** captured_stream) {
11771168
return content;
11781169
}
11791170

1171+
#if defined(_MSC_VER) || defined(__BORLANDC__)
1172+
// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
1173+
const int kStdOutFileno = 1;
1174+
const int kStdErrFileno = 2;
1175+
#else
1176+
const int kStdOutFileno = STDOUT_FILENO;
1177+
const int kStdErrFileno = STDERR_FILENO;
1178+
#endif // defined(_MSC_VER) || defined(__BORLANDC__)
1179+
11801180
// Starts capturing stdout.
11811181
void CaptureStdout() {
11821182
CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);

0 commit comments

Comments
 (0)