mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #10375 from tomoaki0705:buildWarningMSVC
This commit is contained in:
commit
83b8cd0152
@ -309,9 +309,6 @@ if(MSVC)
|
||||
if(MSVC_VERSION EQUAL 1400)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267)
|
||||
endif()
|
||||
if(MSVC_VERSION LESS 1900) # MSVS2015
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127) # warning C4127: conditional expression is constant
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# allow extern "C" functions throw exceptions
|
||||
@ -323,6 +320,7 @@ if(MSVC)
|
||||
endforeach()
|
||||
|
||||
if(NOT ENABLE_NOISY_WARNINGS)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4127) # conditional expression is constant
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4251) # class 'std::XXX' needs to have dll-interface to be used by clients of YYY
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4324) # 'struct_name' : structure was padded due to __declspec(align())
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4275) # non dll-interface class 'std::exception' used as base for dll-interface class 'cv::Exception'
|
||||
|
@ -44,7 +44,7 @@
|
||||
#define _ncvtest_hpp_
|
||||
|
||||
#if defined _MSC_VER
|
||||
# pragma warning( disable : 4201 4408 4127 4100)
|
||||
# pragma warning( disable : 4201 4408 4100)
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
@ -45,10 +45,6 @@ The references are:
|
||||
#include "precomp.hpp"
|
||||
#include "agast_score.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4127 )
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
|
@ -44,10 +44,6 @@ The references are:
|
||||
|
||||
#include "agast_score.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable : 4127 )
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
|
@ -48,9 +48,6 @@ The references are:
|
||||
#include "opencv2/core/hal/intrin.hpp"
|
||||
|
||||
#include "opencv2/core/openvx/ovx_defs.hpp"
|
||||
#if defined _MSC_VER
|
||||
# pragma warning( disable : 4127)
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
@ -78,18 +78,11 @@ extern "C" {
|
||||
namespace cv
|
||||
{
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4324) //structure was padded due to __declspec(align())
|
||||
#endif
|
||||
struct JpegErrorMgr
|
||||
{
|
||||
struct jpeg_error_mgr pub;
|
||||
jmp_buf setjmp_buffer;
|
||||
};
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
struct JpegSource
|
||||
{
|
||||
|
@ -47,10 +47,6 @@
|
||||
|
||||
#include "opencv2/core/openvx/ovx_defs.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable: 4127 ) // conditional expression is constant
|
||||
#endif
|
||||
|
||||
#if CV_SIMD128
|
||||
#define CV_MALLOC_SIMD128 16
|
||||
#endif
|
||||
|
@ -34,7 +34,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning( disable: 4127 ) // conditional expression is constant
|
||||
#pragma warning( disable: 4503 ) // decorated name length exceeded, name was truncated
|
||||
#endif
|
||||
|
||||
|
@ -7976,20 +7976,11 @@ GTEST_API_ std::string AppendUserMessage(
|
||||
// std::runtime_error inherits from std::exception, many testing
|
||||
// frameworks know how to extract and print the message inside it.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(push) // Saves the current warning state.
|
||||
# pragma warning(disable:4275) // Temporarily disables warning 4275.
|
||||
#endif // _MSC_VER
|
||||
|
||||
class GTEST_API_ GoogleTestFailureException : public ::std::runtime_error {
|
||||
public:
|
||||
explicit GoogleTestFailureException(const TestPartResult& failure);
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(pop) // Restores the warning state.
|
||||
#endif // _MSC_VER
|
||||
|
||||
#endif // GTEST_HAS_EXCEPTIONS
|
||||
|
||||
// A helper class for creating scoped traces in user programs.
|
||||
|
@ -51,7 +51,7 @@
|
||||
#define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c )
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER >= 1200
|
||||
#pragma warning( disable: 4244 4510 4512 4610 )
|
||||
#pragma warning( disable: 4244 4510 4610 )
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
@ -83,7 +83,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined _MSC_VER && _MSC_VER >= 1200
|
||||
#pragma warning( default: 4244 4510 4512 4610 )
|
||||
#pragma warning( default: 4244 4510 4610 )
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
@ -2084,11 +2084,6 @@ public:
|
||||
// succeed but return a nullptr pointer. By default, the list does not allow nullptr
|
||||
// pointers.
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4127) // constant expression
|
||||
#endif
|
||||
|
||||
template <class T, bool NULLABLE = FALSE>
|
||||
class ComPtrList : public List<T*>
|
||||
{
|
||||
@ -2179,10 +2174,6 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
/* Be sure to declare webcam device capability in manifest
|
||||
For better media capture support, add the following snippet with correct module name to the project manifest
|
||||
(videoio needs DLL activation class factoryentry points):
|
||||
|
Loading…
Reference in New Issue
Block a user