Commit dbbbad40 authored by Alexander Alekhin's avatar Alexander Alekhin

build: eliminate ICC warnings

parent 540ece74
......@@ -436,6 +436,12 @@ if(MSVC)
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4275) # non dll-interface class 'std::exception' used as base for dll-interface class 'cv::Exception'
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4589) # Constructor of abstract class 'cv::ORB' ignores initializer for virtual base class 'cv::Algorithm'
endif()
if(CV_ICC AND NOT ENABLE_NOISY_WARNINGS)
foreach(flags CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_DEBUG CMAKE_C_FLAGS CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_DEBUG)
string(REGEX REPLACE "( |^)/W[0-9]+( |$)" "\\1\\2" ${flags} "${${flags}}")
endforeach()
endif()
endif()
if(APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT DEFINED ENV{LDFLAGS} AND EXISTS "/usr/local/lib")
......
#include "test_precomp.hpp"
#include <cmath>
#ifndef NAN
#include <limits> // numeric_limits<T>::quiet_NaN()
#define NAN std::numeric_limits<float>::quiet_NaN()
#endif
using namespace cv;
using namespace std;
......@@ -1895,7 +1891,7 @@ TEST(MinMaxLoc, regression_4955_nans)
cv::Mat one_mat(2, 2, CV_32F, cv::Scalar(1));
cv::minMaxLoc(one_mat, NULL, NULL, NULL, NULL);
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(NAN));
cv::Mat nan_mat(2, 2, CV_32F, cv::Scalar(std::numeric_limits<float>::quiet_NaN()));
cv::minMaxLoc(nan_mat, NULL, NULL, NULL, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment