Merge pull request #3863 from eidosmontreal:fix_unused-variable_warning
PiperOrigin-RevId: 454940948 Change-Id: Ic87dadfe9c6fc8882b0f425aa2056f0cc7a90b55
This commit is contained in:
commit
191ca1f3a9
@ -90,15 +90,6 @@
|
||||
namespace testing {
|
||||
namespace internal {
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
|
||||
const int kStdOutFileno = 1;
|
||||
const int kStdErrFileno = 2;
|
||||
#else
|
||||
const int kStdOutFileno = STDOUT_FILENO;
|
||||
const int kStdErrFileno = STDERR_FILENO;
|
||||
#endif // _MSC_VER
|
||||
|
||||
#if GTEST_OS_LINUX || GTEST_OS_GNU_HURD
|
||||
|
||||
namespace {
|
||||
@ -1177,6 +1168,15 @@ static std::string GetCapturedStream(CapturedStream** captured_stream) {
|
||||
return content;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
// MSVC and C++Builder do not provide a definition of STDERR_FILENO.
|
||||
const int kStdOutFileno = 1;
|
||||
const int kStdErrFileno = 2;
|
||||
#else
|
||||
const int kStdOutFileno = STDOUT_FILENO;
|
||||
const int kStdErrFileno = STDERR_FILENO;
|
||||
#endif // defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
|
||||
// Starts capturing stdout.
|
||||
void CaptureStdout() {
|
||||
CaptureStream(kStdOutFileno, "stdout", &g_captured_stdout);
|
||||
|
Loading…
Reference in New Issue
Block a user