From d064079a4eadc95f66c13202a904690dd92715ad Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Wed, 25 Dec 2019 23:26:59 +0000 Subject: [PATCH] build: eliminate build warnings --- cmake/OpenCVUtils.cmake | 2 +- samples/opencl/opencl-opencv-interop.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index 86d4f04a78..f21a9acf14 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -401,7 +401,7 @@ macro(ocv_clear_vars) endmacro() set(OCV_COMPILER_FAIL_REGEX - "argument '.*' is not valid" # GCC 9+ + "argument .* is not valid" # GCC 9+ (including support of unicode quotes) "command line option .* is valid for .* but not for C\\+\\+" # GNU "command line option .* is valid for .* but not for C" # GNU "unrecognized .*option" # GNU diff --git a/samples/opencl/opencl-opencv-interop.cpp b/samples/opencl/opencl-opencv-interop.cpp index f648f78bf8..f1f0e6b0eb 100644 --- a/samples/opencl/opencl-opencv-interop.cpp +++ b/samples/opencl/opencl-opencv-interop.cpp @@ -17,6 +17,7 @@ #define CL_USE_DEPRECATED_OPENCL_1_1_APIS #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #define CL_USE_DEPRECATED_OPENCL_2_0_APIS // eliminate build warning +#define CL_TARGET_OPENCL_VERSION 200 // 2.0 #ifdef __APPLE__ #define CL_SILENCE_DEPRECATION @@ -677,7 +678,7 @@ int App::initVideoSource() throw std::runtime_error(std::string("specify video source")); } - catch (const std::exception e) + catch (const std::exception& e) { cerr << "ERROR: " << e.what() << std::endl; return -1;