提交 5b2b7676 编写于 作者: R Roman Donchenko

Fix miscellaneous warnings from compiling with MinGW.

Note that MinGW defines NOMINMAX by default.
上级 c244f000
...@@ -42,7 +42,9 @@ ...@@ -42,7 +42,9 @@
#include "precomp.hpp" #include "precomp.hpp"
#if GTEST_OS_WINDOWS #if GTEST_OS_WINDOWS
#ifndef NOMINMAX
#define NOMINMAX #define NOMINMAX
#endif
# include <windows.h> # include <windows.h>
#endif #endif
...@@ -278,7 +280,7 @@ enum GTestColor { ...@@ -278,7 +280,7 @@ enum GTestColor {
}; };
#if GTEST_OS_WINDOWS&&!GTEST_OS_WINDOWS_MOBILE #if GTEST_OS_WINDOWS&&!GTEST_OS_WINDOWS_MOBILE
// Returns the character attribute for the given color. // Returns the character attribute for the given color.
WORD GetColorAttribute(GTestColor color) { static WORD GetColorAttribute(GTestColor color) {
switch (color) { switch (color) {
case COLOR_RED: return FOREGROUND_RED; case COLOR_RED: return FOREGROUND_RED;
case COLOR_GREEN: return FOREGROUND_GREEN; case COLOR_GREEN: return FOREGROUND_GREEN;
......
...@@ -142,7 +142,7 @@ typedef struct ...@@ -142,7 +142,7 @@ typedef struct
int imgoff; int imgoff;
float factor; float factor;
} detect_piramid_info; } detect_piramid_info;
#ifdef WIN32 #ifdef _MSC_VER
#define _ALIGNED_ON(_ALIGNMENT) __declspec(align(_ALIGNMENT)) #define _ALIGNED_ON(_ALIGNMENT) __declspec(align(_ALIGNMENT))
typedef _ALIGNED_ON(128) struct GpuHidHaarTreeNode typedef _ALIGNED_ON(128) struct GpuHidHaarTreeNode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册