提交 59ccf2c9 编写于 作者: A Alexander Alekhin

Merge pull request #12272 from alalek:fix_build_static_analysis

......@@ -414,7 +414,7 @@ CV_INLINE CV_NORETURN void errorNoReturn(int _code, const String& _err, const ch
// We need to use simplified definition for them.
#define CV_Error(...) do { abort(); } while (0)
#define CV_Error_( code, args ) do { cv::format args; abort(); } while (0)
#define CV_Assert_1( expr ) do { if (!(expr)) abort(); } while (0)
#define CV_Assert( expr ) do { if (!(expr)) abort(); } while (0)
#else // CV_STATIC_ANALYSIS
......@@ -473,6 +473,11 @@ configurations while CV_DbgAssert is only retained in the Debug configuration.
//! @cond IGNORED
#if defined OPENCV_FORCE_MULTIARG_ASSERT_CHECK && defined CV_STATIC_ANALYSIS
#warning "OPENCV_FORCE_MULTIARG_ASSERT_CHECK can't be used with CV_STATIC_ANALYSIS"
#undef OPENCV_FORCE_MULTIARG_ASSERT_CHECK
#endif
#ifdef OPENCV_FORCE_MULTIARG_ASSERT_CHECK
#define CV_Assert_1( expr ) do { if(!!(expr)) ; else cv::error( cv::Error::StsAssert, #expr, CV_Func, __FILE__, __LINE__ ); } while(0)
#else
......
......@@ -349,7 +349,13 @@ Cv64suf;
// We need to use simplified definition for them.
#ifndef CV_STATIC_ANALYSIS
# if defined(__KLOCWORK__) || defined(__clang_analyzer__) || defined(__COVERITY__)
# define CV_STATIC_ANALYSIS
# define CV_STATIC_ANALYSIS 1
# endif
#else
# if defined(CV_STATIC_ANALYSIS) && !(__CV_CAT(1, CV_STATIC_ANALYSIS) == 1) // defined and not empty
# if 0 == CV_STATIC_ANALYSIS
# undef CV_STATIC_ANALYSIS
# endif
# endif
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册