From 1836d41b5c87cc572c933430c49f30aea227b73b Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Fri, 11 Dec 2015 15:58:47 +0300 Subject: [PATCH] warning fix (MSVS2015) --- modules/core/src/dxt.cpp | 2 +- samples/opencl/opencl-opencv-interop.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/core/src/dxt.cpp b/modules/core/src/dxt.cpp index 5576a347a..691b29746 100644 --- a/modules/core/src/dxt.cpp +++ b/modules/core/src/dxt.cpp @@ -2215,7 +2215,7 @@ class PlanCache clAmdFftDim dim = dft_size.height == 1 || dft_rows ? CLFFT_1D : CLFFT_2D; size_t batchSize = dft_rows ? dft_size.height : 1; - size_t clLengthsIn[3] = { dft_size.width, dft_rows ? 1 : dft_size.height, 1 }; + size_t clLengthsIn[3] = { (size_t)dft_size.width, dft_rows ? 1 : (size_t)dft_size.height, 1 }; size_t clStridesIn[3] = { 1, 1, 1 }; size_t clStridesOut[3] = { 1, 1, 1 }; int elemSize = doubleFP ? sizeof(double) : sizeof(float); diff --git a/samples/opencl/opencl-opencv-interop.cpp b/samples/opencl/opencl-opencv-interop.cpp index 5d5d52e02..4f96280cb 100644 --- a/samples/opencl/opencl-opencv-interop.cpp +++ b/samples/opencl/opencl-opencv-interop.cpp @@ -770,7 +770,7 @@ int App::process_frame_with_open_cl(cv::Mat& frame, bool use_buffer, cl_mem* mem return -1; size_t origin[] = { 0, 0, 0 }; - size_t region[] = { frame.cols, frame.rows, 1 }; + size_t region[] = { (size_t)frame.cols, (size_t)frame.rows, 1 }; res = clEnqueueCopyImage(m_queue, m_img_src, mem, origin, origin, region, 0, 0, &m_event); if (CL_SUCCESS != res) return -1; @@ -796,7 +796,7 @@ int App::process_frame_with_open_cl(cv::Mat& frame, bool use_buffer, cl_mem* mem return -1; // process left half of frame in OpenCL - size_t size[] = { frame.cols / 2, frame.rows }; + size_t size[] = { (size_t)frame.cols / 2, (size_t)frame.rows }; res = clEnqueueNDRangeKernel(m_queue, kernel, 2, 0, size, 0, 0, 0, &m_event); if (CL_SUCCESS != res) return -1;