From 35edad3e74464cc6b5873272637c8703cc8edc76 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Tue, 5 Mar 2019 14:47:04 +0300 Subject: [PATCH] build: fix warnings --- modules/core/src/cuda_host_mem.cpp | 2 +- modules/core/src/opengl.cpp | 4 ++-- modules/highgui/src/window_QT.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/core/src/cuda_host_mem.cpp b/modules/core/src/cuda_host_mem.cpp index 6a79320..ab2c611 100644 --- a/modules/core/src/cuda_host_mem.cpp +++ b/modules/core/src/cuda_host_mem.cpp @@ -206,7 +206,7 @@ void cv::cuda::HostMem::create(int rows_, int cols_, int type_) cols = cols_; step = elemSize() * cols; int sz[] = { rows, cols }; - size_t steps[] = { step, CV_ELEM_SIZE(type_) }; + size_t steps[] = { step, (size_t)CV_ELEM_SIZE(type_) }; flags = updateContinuityFlag(flags, 2, sz, steps); if (alloc_type == SHARED) diff --git a/modules/core/src/opengl.cpp b/modules/core/src/opengl.cpp index d98663b..14f5588 100644 --- a/modules/core/src/opengl.cpp +++ b/modules/core/src/opengl.cpp @@ -1726,7 +1726,7 @@ void convertToGLTexture2D(InputArray src, Texture2D& texture) CV_Error(cv::Error::OpenCLApiCallError, "OpenCL: clEnqueueAcquireGLObjects failed"); size_t offset = 0; // TODO size_t dst_origin[3] = {0, 0, 0}; - size_t region[3] = {u.cols, u.rows, 1}; + size_t region[3] = { (size_t)u.cols, (size_t)u.rows, 1}; status = clEnqueueCopyBufferToImage(q, clBuffer, clImage, offset, dst_origin, region, 0, NULL, NULL); if (status != CL_SUCCESS) CV_Error(cv::Error::OpenCLApiCallError, "OpenCL: clEnqueueCopyBufferToImage failed"); @@ -1786,7 +1786,7 @@ void convertFromGLTexture2D(const Texture2D& texture, OutputArray dst) CV_Error(cv::Error::OpenCLApiCallError, "OpenCL: clEnqueueAcquireGLObjects failed"); size_t offset = 0; // TODO size_t src_origin[3] = {0, 0, 0}; - size_t region[3] = {u.cols, u.rows, 1}; + size_t region[3] = { (size_t)u.cols, (size_t)u.rows, 1}; status = clEnqueueCopyImageToBuffer(q, clImage, clBuffer, src_origin, region, offset, 0, NULL, NULL); if (status != CL_SUCCESS) CV_Error(cv::Error::OpenCLApiCallError, "OpenCL: clEnqueueCopyImageToBuffer failed"); diff --git a/modules/highgui/src/window_QT.cpp b/modules/highgui/src/window_QT.cpp index 9425c7b..1acd0d1 100644 --- a/modules/highgui/src/window_QT.cpp +++ b/modules/highgui/src/window_QT.cpp @@ -103,7 +103,7 @@ CV_IMPL CvFont cvFontQt(const char* nameFont, int pointSize,CvScalar color,int w float dx;//spacing letter in Qt (0 default) in pixel int line_type;//<- pointSize in Qt */ - CvFont f = {nameFont,color,style,NULL,NULL,NULL,0,0,0,weight,spacing,pointSize}; + CvFont f = {nameFont,color,style,NULL,NULL,NULL,0,0,0,weight, (float)spacing, pointSize}; return f; } -- 2.7.4