From 102b50483a4b515a94a5b1c75db468eb071cf172 Mon Sep 17 00:00:00 2001 From: kosak Date: Mon, 17 Nov 2014 02:56:14 +0000 Subject: [PATCH] Noop changes to suppress compile-time warnings in WINDOWS code paths. --- include/gtest/internal/gtest-port.h | 1 + src/gtest.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 60092472..d8f22c25 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -2317,6 +2317,7 @@ inline const char* StrError(int errnum) { return strerror(errnum); } inline const char* GetEnv(const char* name) { #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE | GTEST_OS_WINDOWS_RT // We are on Windows CE, which has no environment variables. + static_cast(name); // To prevent 'unused argument' warning. return NULL; #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) // Environment variables which we programmatically clear will be set to the diff --git a/src/gtest.cc b/src/gtest.cc index e4f3df3e..dc06e022 100644 --- a/src/gtest.cc +++ b/src/gtest.cc @@ -2909,7 +2909,7 @@ void ColoredPrintf(GTestColor color, const char* fmt, ...) { #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_SYMBIAN || GTEST_OS_ZOS || \ GTEST_OS_IOS || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT - const bool use_color = false; + const bool use_color = AlwaysFalse(); #else static const bool in_color_mode = ShouldUseColor(posix::IsATTY(posix::FileNo(stdout)) != 0);