diff --git a/modules/ocl/perf/precomp.cpp b/modules/ocl/perf/precomp.cpp index 9fc634290e..dd3b5e4ea1 100644 --- a/modules/ocl/perf/precomp.cpp +++ b/modules/ocl/perf/precomp.cpp @@ -42,7 +42,9 @@ #include "precomp.hpp" #if GTEST_OS_WINDOWS +#ifndef NOMINMAX #define NOMINMAX +#endif # include #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; diff --git a/modules/ocl/src/haar.cpp b/modules/ocl/src/haar.cpp index 565270cdc1..6283ac8d9f 100644 --- a/modules/ocl/src/haar.cpp +++ b/modules/ocl/src/haar.cpp @@ -142,7 +142,7 @@ typedef struct int imgoff; float factor; } detect_piramid_info; -#ifdef WIN32 +#ifdef _MSC_VER #define _ALIGNED_ON(_ALIGNMENT) __declspec(align(_ALIGNMENT)) typedef _ALIGNED_ON(128) struct GpuHidHaarTreeNode