diff --git a/modules/core/src/cuda/matrix_operations.cu b/modules/core/src/cuda/matrix_operations.cu index 6bf1549dd5..671fa5fc31 100644 --- a/modules/core/src/cuda/matrix_operations.cu +++ b/modules/core/src/cuda/matrix_operations.cu @@ -44,7 +44,7 @@ #include "opencv2/gpu/device/transform.hpp" #include "opencv2/gpu/device/functional.hpp" -namespace cv { namespace gpu { namespace device +namespace cv { namespace gpu { namespace device { template struct shift_and_sizeof; template <> struct shift_and_sizeof { enum { shift = 0 }; }; @@ -272,7 +272,7 @@ namespace cv { namespace gpu { namespace device template struct TransformFunctorTraits< Convertor > : detail::ConvertTraits< Convertor > { }; - + template void cvt_(DevMem2Db src, DevMem2Db dst, double alpha, double beta, cudaStream_t stream) { @@ -282,6 +282,11 @@ namespace cv { namespace gpu { namespace device cv::gpu::device::transform((DevMem2D_)src, (DevMem2D_)dst, op, WithOutMask(), stream); } +#if defined __clang__ +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wmissing-declarations" +#endif + void convert_gpu(DevMem2Db src, int sdepth, DevMem2Db dst, int ddepth, double alpha, double beta, cudaStream_t stream) { typedef void (*caller_t)(DevMem2Db src, DevMem2Db dst, double alpha, double beta, cudaStream_t stream); @@ -318,4 +323,8 @@ namespace cv { namespace gpu { namespace device func(src, dst, alpha, beta, stream); } + +#if defined __clang__ +# pragma clang diagnostic pop +#endif }}} // namespace cv { namespace gpu { namespace device diff --git a/modules/core/src/gpumat.cpp b/modules/core/src/gpumat.cpp index c901bf4925..105a5ff15f 100644 --- a/modules/core/src/gpumat.cpp +++ b/modules/core/src/gpumat.cpp @@ -1199,10 +1199,6 @@ namespace void setTo(GpuMat& m, Scalar s, const GpuMat& mask) const { - NppiSize sz; - sz.width = m.cols; - sz.height = m.rows; - if (mask.empty()) { if (s[0] == 0.0 && s[1] == 0.0 && s[2] == 0.0 && s[3] == 0.0)