Fix miscellaneous warnings from compiling with MinGW.

Note that MinGW defines NOMINMAX by default.
This commit is contained in:
Roman Donchenko
2013-06-26 14:59:00 +04:00
parent c244f000ab
commit 5b2b76763e
2 changed files with 4 additions and 2 deletions

View File

@@ -42,7 +42,9 @@
#include "precomp.hpp"
#if GTEST_OS_WINDOWS
#ifndef NOMINMAX
#define NOMINMAX
#endif
# include <windows.h>
#endif
@@ -278,7 +280,7 @@ enum GTestColor {
};
#if GTEST_OS_WINDOWS&&!GTEST_OS_WINDOWS_MOBILE
// Returns the character attribute for the given color.
WORD GetColorAttribute(GTestColor color) {
static WORD GetColorAttribute(GTestColor color) {
switch (color) {
case COLOR_RED: return FOREGROUND_RED;
case COLOR_GREEN: return FOREGROUND_GREEN;