From 8190837dd4fcdfc218945e21362daab183cbfdff Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Wed, 22 Dec 2010 07:30:21 +0000 Subject: [PATCH] fixed some warnings under linux --- modules/gpu/src/filtering.cpp | 1 - modules/gpu/src/imgproc_gpu.cpp | 12 ++++++------ modules/gpu/src/match_template.cpp | 2 +- modules/gpu/src/stereobp.cpp | 4 +--- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/modules/gpu/src/filtering.cpp b/modules/gpu/src/filtering.cpp index b611e4980b..b9b8a8d78e 100644 --- a/modules/gpu/src/filtering.cpp +++ b/modules/gpu/src/filtering.cpp @@ -810,7 +810,6 @@ Ptr cv::gpu::createSeparableLinearFilter_GPU(int srcType, int if (columnBorderType < 0) columnBorderType = rowBorderType; - int sdepth = CV_MAT_DEPTH(srcType), ddepth = CV_MAT_DEPTH(dstType); int cn = CV_MAT_CN(srcType); int bdepth = CV_32F; int bufType = CV_MAKETYPE(bdepth, cn); diff --git a/modules/gpu/src/imgproc_gpu.cpp b/modules/gpu/src/imgproc_gpu.cpp index 88e3e41fc0..7374c93b22 100644 --- a/modules/gpu/src/imgproc_gpu.cpp +++ b/modules/gpu/src/imgproc_gpu.cpp @@ -309,12 +309,12 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom dst.create(src.rows + top + bottom, src.cols + left + right, src.type()); - NppiSize srcsz; - srcsz.width = src.cols; - srcsz.height = src.rows; + NppiSize srcsz; + srcsz.width = src.cols; + srcsz.height = src.rows; NppiSize dstsz; - dstsz.width = dst.cols; - dstsz.height = dst.rows; + dstsz.width = dst.cols; + dstsz.height = dst.rows; switch (src.type()) { @@ -341,7 +341,7 @@ void cv::gpu::copyMakeBorder(const GpuMat& src, GpuMat& dst, int top, int bottom } case CV_32FC1: { - float val = static_cast(value[0]); + Npp32f val = static_cast(value[0]); Npp32s nVal = *(reinterpret_cast(&val)); nppSafeCall( nppiCopyConstBorder_32s_C1R(src.ptr(), src.step, srcsz, dst.ptr(), dst.step, dstsz, top, left, nVal) ); diff --git a/modules/gpu/src/match_template.cpp b/modules/gpu/src/match_template.cpp index 20e1d1bca0..e78badb16b 100644 --- a/modules/gpu/src/match_template.cpp +++ b/modules/gpu/src/match_template.cpp @@ -577,7 +577,7 @@ void cv::gpu::matchTemplate(const GpuMat& image, const GpuMat& templ, GpuMat& re static const Caller callers32F[] = { ::matchTemplate_SQDIFF_32F, 0, ::matchTemplate_CCORR_32F, 0, 0, 0 }; - const Caller* callers; + const Caller* callers = 0; switch (image.depth()) { case CV_8U: callers = callers8U; break; diff --git a/modules/gpu/src/stereobp.cpp b/modules/gpu/src/stereobp.cpp index 1487abb0c7..f4dd8f13a3 100644 --- a/modules/gpu/src/stereobp.cpp +++ b/modules/gpu/src/stereobp.cpp @@ -130,9 +130,7 @@ namespace { CV_Assert(0 < rthis.ndisp && 0 < rthis.iters && 0 < rthis.levels); CV_Assert(rthis.msg_type == CV_32F || rthis.msg_type == CV_16S); - - if (rthis.msg_type == CV_16S) - CV_Assert((1 << (rthis.levels - 1)) * scale * rthis.max_data_term < numeric_limits::max()); + CV_Assert(rthis.msg_type == CV_32F || (1 << (rthis.levels - 1)) * scale * rthis.max_data_term < numeric_limits::max()); } void operator()(const GpuMat& left, const GpuMat& right, GpuMat& disp, cudaStream_t stream)