COMP: Fix problem with narrowing in c++11
modules/core/src/arithm.cpp:345:51: error: constant expression evaluates to 4294967295 which cannot be narrowed to type 'int' [-Wc++11-narrowing] static int CV_DECL_ALIGNED(16) v64f_absmask[] = { 0xffffffff, 0x7fffffff, 0xffffffff, 0x7fffffff }; ^~~~~~~~~~ Converted to unsigned int. This variable is only used to initialize a bit pattern anywhy for a 128bit type.
This commit is contained in:
@@ -4591,7 +4591,7 @@ struct Image2D::Impl
|
||||
CV_OclDbgAssert(err == CL_SUCCESS);
|
||||
|
||||
size_t origin[] = { 0, 0, 0 };
|
||||
size_t region[] = { src.cols, src.rows, 1 };
|
||||
size_t region[] = { static_cast<size_t>(src.cols), static_cast<size_t>(src.rows), 1 };
|
||||
|
||||
cl_mem devData;
|
||||
if (!alias && !src.isContinuous())
|
||||
@@ -4599,7 +4599,7 @@ struct Image2D::Impl
|
||||
devData = clCreateBuffer(context, CL_MEM_READ_ONLY, src.cols * src.rows * src.elemSize(), NULL, &err);
|
||||
CV_OclDbgAssert(err == CL_SUCCESS);
|
||||
|
||||
const size_t roi[3] = {src.cols * src.elemSize(), src.rows, 1};
|
||||
const size_t roi[3] = {static_cast<size_t>(src.cols) * src.elemSize(), static_cast<size_t>(src.rows), 1};
|
||||
CV_Assert(clEnqueueCopyBufferRect(queue, (cl_mem)src.handle(ACCESS_READ), devData, origin, origin,
|
||||
roi, src.step, 0, src.cols * src.elemSize(), 0, 0, NULL, NULL) == CL_SUCCESS);
|
||||
CV_OclDbgAssert(clFlush(queue) == CL_SUCCESS);
|
||||
|
Reference in New Issue
Block a user