Fix miscellaneous warnings from compiling with MinGW.
authorRoman Donchenko <roman.donchenko@itseez.com>
Wed, 26 Jun 2013 10:59:00 +0000 (14:59 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Wed, 26 Jun 2013 10:59:00 +0000 (14:59 +0400)
Note that MinGW defines NOMINMAX by default.

modules/ocl/perf/precomp.cpp
modules/ocl/src/haar.cpp

index 9fc634290e9626abdeb0c225d46d1b9e8dfa0644..dd3b5e4ea14ae51b528a431982752830fd0cd994 100644 (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;
index 565270cdc1789f528140c6ff53f6318395413af8..6283ac8d9f5efa008573c6c90f3e578d4aeb2ccc 100644 (file)
@@ -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