From ba3b1de93f1d0dc602a6e8ddf0eb4988bcb932ee Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 15 Apr 2016 21:48:39 +0300 Subject: [PATCH] Updates for XCode 7.3 --- 3rdparty/zlib/CMakeLists.txt | 2 +- modules/ts/include/opencv2/ts/ts_perf.hpp | 7 ++++++- .../features2D/AKAZE_tracking/planar_tracking.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/3rdparty/zlib/CMakeLists.txt b/3rdparty/zlib/CMakeLists.txt index 6a2cbebba4..3376c3efda 100644 --- a/3rdparty/zlib/CMakeLists.txt +++ b/3rdparty/zlib/CMakeLists.txt @@ -82,7 +82,7 @@ if(UNIX) endif() endif() -ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations) +ocv_warnings_disable(CMAKE_C_FLAGS -Wshorten-64-to-32 -Wattributes -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshift-negative-value) set_target_properties(${ZLIB_LIBRARY} PROPERTIES OUTPUT_NAME ${ZLIB_LIBRARY} diff --git a/modules/ts/include/opencv2/ts/ts_perf.hpp b/modules/ts/include/opencv2/ts/ts_perf.hpp index a300487e03..c8bddf3fcd 100644 --- a/modules/ts/include/opencv2/ts/ts_perf.hpp +++ b/modules/ts/include/opencv2/ts/ts_perf.hpp @@ -369,7 +369,12 @@ public: static enum PERF_STRATEGY getCurrentModulePerformanceStrategy(); static enum PERF_STRATEGY setModulePerformanceStrategy(enum PERF_STRATEGY strategy); - class PerfSkipTestException: public cv::Exception {}; + class PerfSkipTestException: public cv::Exception + { + int dummy; // workaround for MacOSX Xcode 7.3 bug (don't make class "empty") + public: + PerfSkipTestException() : dummy(0) {} + }; protected: virtual void PerfTestBody() = 0; diff --git a/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp b/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp index 7a36e9f910..4920e428cf 100755 --- a/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp +++ b/samples/cpp/tutorial_code/features2D/AKAZE_tracking/planar_tracking.cpp @@ -57,7 +57,7 @@ void Tracker::setFirstFrame(const Mat frame, vector bb, string title, S drawBoundingBox(first_frame, bb); putText(first_frame, title, Point(0, 60), FONT_HERSHEY_PLAIN, 5, Scalar::all(0), 4); object_bb = bb; - delete ptMask; + delete[] ptMask; } Mat Tracker::process(const Mat frame, Stats& stats)