diff --git a/3rdparty/libwebp/CMakeLists.txt b/3rdparty/libwebp/CMakeLists.txt index 54bda495b..b54819e7b 100644 --- a/3rdparty/libwebp/CMakeLists.txt +++ b/3rdparty/libwebp/CMakeLists.txt @@ -40,7 +40,7 @@ if(UNIX) endif() endif() -ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow) +ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable -Wshadow -Wmaybe-uninitialized) ocv_warnings_disable(CMAKE_C_FLAGS /wd4244 /wd4267) # vs2005 set_target_properties(${WEBP_LIBRARY} diff --git a/modules/imgproc/src/floodfill.cpp b/modules/imgproc/src/floodfill.cpp index 40556c48d..c49611f60 100644 --- a/modules/imgproc/src/floodfill.cpp +++ b/modules/imgproc/src/floodfill.cpp @@ -42,6 +42,10 @@ #include "precomp.hpp" +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic ignored "-Warray-bounds" +#endif + namespace cv { diff --git a/modules/imgproc/test/test_convhull.cpp b/modules/imgproc/test/test_convhull.cpp index 9e4cd07c4..0a1428f0a 100644 --- a/modules/imgproc/test/test_convhull.cpp +++ b/modules/imgproc/test/test_convhull.cpp @@ -1380,6 +1380,10 @@ CV_FitLineTest::CV_FitLineTest() max_noise = 0.05; } +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Warray-bounds" +#endif void CV_FitLineTest::generate_point_set( void* pointsSet ) { @@ -1452,6 +1456,9 @@ void CV_FitLineTest::generate_point_set( void* pointsSet ) } } +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic pop +#endif int CV_FitLineTest::prepare_test_case( int test_case_idx ) { @@ -1477,6 +1484,10 @@ void CV_FitLineTest::run_func() cv::fitLine(cv::cvarrToMat(points), (cv::Vec6f&)line[0], dist_type, 0, reps, aeps); } +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Warray-bounds" +#endif int CV_FitLineTest::validate_test_results( int test_case_idx ) { @@ -1556,6 +1567,9 @@ _exit_: return code; } +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic pop +#endif /****************************************************************************************\ * ContourMoments Test * diff --git a/modules/legacy/src/bgfg_gaussmix.cpp b/modules/legacy/src/bgfg_gaussmix.cpp index ae75e40c2..4a19fde38 100644 --- a/modules/legacy/src/bgfg_gaussmix.cpp +++ b/modules/legacy/src/bgfg_gaussmix.cpp @@ -413,6 +413,11 @@ CV_INLINE int _icvRemoveShadowGMM(float* data, int nD, //IEEE Trans. on Pattern Analysis and Machine Intelligence, vol.26, no.5, pages 651-656, 2004 //http://www.zoranz.net/Publications/zivkovic2004PAMI.pdf +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif + CV_INLINE int _icvUpdateGMM(float* data, int nD, unsigned char* pModesUsed, CvPBGMMGaussian* pGMM, @@ -601,6 +606,10 @@ CV_INLINE int _icvUpdateGMM(float* data, int nD, return bBackground; } +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic pop +#endif + // a bit more efficient implementation for common case of 3 channel (rgb) images CV_INLINE int _icvUpdateGMM_C3(float r,float g, float b, unsigned char* pModesUsed, diff --git a/modules/legacy/src/lmeds.cpp b/modules/legacy/src/lmeds.cpp index 779464076..33b57a759 100644 --- a/modules/legacy/src/lmeds.cpp +++ b/modules/legacy/src/lmeds.cpp @@ -162,6 +162,12 @@ icvLMedS( int *points1, int *points2, int numPoints, CvMatrix3 * fundamentalMatr /*===========================================================================*/ /*===========================================================================*/ + +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Warray-bounds" +#endif + void icvChoose7( int *ml, int *mr, int num, int *ml7, int *mr7 ) { @@ -322,6 +328,10 @@ icvCubic( double a2, double a1, double a0, double *squares ) return CV_NO_ERR; } /* icvCubic */ +#if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) +# pragma GCC diagnostic pop +#endif + /*======================================================================================*/ double icvDet( double *M ) diff --git a/platforms/android/android.toolchain.cmake b/platforms/android/android.toolchain.cmake index d7f09c788..bee73dbea 100644 --- a/platforms/android/android.toolchain.cmake +++ b/platforms/android/android.toolchain.cmake @@ -318,7 +318,7 @@ set( CMAKE_SYSTEM_VERSION 1 ) # rpath makes low sence for Android set( CMAKE_SKIP_RPATH TRUE CACHE BOOL "If set, runtime paths are not added when using shared libraries." ) -set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" ) +set( ANDROID_SUPPORTED_NDK_VERSIONS ${ANDROID_EXTRA_NDK_VERSIONS} -r9 -r8e -r8d -r8c -r8b -r8 -r7c -r7b -r7 -r6b -r6 -r5c -r5b -r5 "" ) if(NOT DEFINED ANDROID_NDK_SEARCH_PATHS) if( CMAKE_HOST_WIN32 ) file( TO_CMAKE_PATH "$ENV{PROGRAMFILES}" ANDROID_NDK_SEARCH_PATHS ) @@ -484,7 +484,9 @@ else() message( FATAL_ERROR "Cross-compilation on your platform is not supported by this cmake toolchain" ) endif() -if( NOT ANDROID_NDK_HOST_X64 ) +# CMAKE_HOST_SYSTEM_PROCESSOR on MacOS X always says i386 on Intel platform +# So we do not trust ANDROID_NDK_HOST_X64 on Apple hosts +if( NOT ANDROID_NDK_HOST_X64 AND NOT CMAKE_HOST_APPLE) set( ANDROID_NDK_HOST_SYSTEM_NAME ${ANDROID_NDK_HOST_SYSTEM_NAME2} ) endif()