diff --git a/3rdparty/libpng/CMakeLists.txt b/3rdparty/libpng/CMakeLists.txt index f72b966079..921391eadf 100644 --- a/3rdparty/libpng/CMakeLists.txt +++ b/3rdparty/libpng/CMakeLists.txt @@ -66,6 +66,11 @@ if(PPC64LE OR PPC64) endif() endif() +if(APPLE AND CV_CLANG AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.1) + ocv_warnings_disable(CMAKE_C_FLAGS -Wnull-pointer-subtraction) + ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-but-set-variable) +endif() + # ---------------------------------------------------------------------------------- # Define the library target: # ---------------------------------------------------------------------------------- diff --git a/modules/calib3d/test/test_cameracalibration.cpp b/modules/calib3d/test/test_cameracalibration.cpp index a63c131a0f..407b9004b1 100644 --- a/modules/calib3d/test/test_cameracalibration.cpp +++ b/modules/calib3d/test/test_cameracalibration.cpp @@ -559,12 +559,9 @@ void CV_CameraCalibrationTest::run( int start_from ) i = 0; double dx,dy; double rx,ry; - double meanDx,meanDy; double maxDx = 0.0; double maxDy = 0.0; - meanDx = 0; - meanDy = 0; for( currImage = 0; currImage < numImages; currImage++ ) { double imageMeanDx = 0; @@ -576,9 +573,6 @@ void CV_CameraCalibrationTest::run( int start_from ) dx = rx - imagePoints[i].x; dy = ry - imagePoints[i].y; - meanDx += dx; - meanDy += dy; - imageMeanDx += dx*dx; imageMeanDy += dy*dy; @@ -601,9 +595,6 @@ void CV_CameraCalibrationTest::run( int start_from ) perViewErrors[currImage] = goodPerViewErrors[currImage]; } - meanDx /= numImages * etalonSize.width * etalonSize.height; - meanDy /= numImages * etalonSize.width * etalonSize.height; - /* ========= Compare parameters ========= */ /* ----- Compare focal lengths ----- */ diff --git a/modules/flann/include/opencv2/flann/index_testing.h b/modules/flann/include/opencv2/flann/index_testing.h index 207adef449..4c00143326 100644 --- a/modules/flann/include/opencv2/flann/index_testing.h +++ b/modules/flann/include/opencv2/flann/index_testing.h @@ -246,7 +246,6 @@ void test_index_precisions(NNIndex& index, const Matrix& index, const Matrix 0)&&(time > maxTime)&&(p2 middle; k-- ) { CV_Assert(vals[ofs[k]] >= pivot); - more += vals[ofs[k]] > pivot; } return vals[ofs[middle]]; diff --git a/modules/ts/include/opencv2/ts.hpp b/modules/ts/include/opencv2/ts.hpp index 5364143d15..3777c8eb2b 100644 --- a/modules/ts/include/opencv2/ts.hpp +++ b/modules/ts/include/opencv2/ts.hpp @@ -122,6 +122,9 @@ //#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wsuggest-override" #endif +#if defined(__OPENCV_BUILD) && defined(__APPLE__) && defined(__clang__) && ((__clang_major__*100 + __clang_minor__) >= 1301) +#pragma clang diagnostic ignored "-Wdeprecated-copy" +#endif #include "opencv2/ts/ts_gtest.h" #if defined(__OPENCV_BUILD) && defined(__GNUC__) && __GNUC__ >= 5 //#pragma GCC diagnostic pop diff --git a/modules/video/test/test_optflowpyrlk.cpp b/modules/video/test/test_optflowpyrlk.cpp index 1f08270ec7..a7e9a2d3a5 100644 --- a/modules/video/test/test_optflowpyrlk.cpp +++ b/modules/video/test/test_optflowpyrlk.cpp @@ -65,7 +65,7 @@ void CV_OptFlowPyrLKTest::run( int ) const int bad_points_max = 8; /* test parameters */ - double max_err = 0., sum_err = 0; + double max_err = 0.; int pt_cmpd = 0; int pt_exceed = 0; int merr_i = 0, merr_j = 0, merr_k = 0, merr_nan = 0; @@ -175,7 +175,6 @@ void CV_OptFlowPyrLKTest::run( int ) } pt_exceed += err > success_error_level; - sum_err += err; pt_cmpd++; } else