Merge pull request #11402 from alalek:build_warnings

pull/11410/head
Alexander Alekhin 7 years ago
commit 1031dfe4e8
  1. 3
      cmake/OpenCVDetectCUDA.cmake
  2. 12
      modules/core/src/cuda_gpu_mat.cpp
  3. 1
      modules/videoio/src/cap_openni2.cpp

@ -200,6 +200,9 @@ if(CUDA_FOUND)
string(REPLACE "-frtti" "" ${var} "${${var}}")
string(REPLACE "-fvisibility-inlines-hidden" "" ${var} "${${var}}")
# cc1: warning: command line option '-Wsuggest-override' is valid for C++/ObjC++ but not for C
string(REPLACE "-Wsuggest-override" "" ${var} "${${var}}")
endforeach()
endmacro()

@ -344,13 +344,12 @@ void cv::cuda::ensureSizeIsEnough(int rows, int cols, int type, OutputArray arr)
GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
{
GpuMat src;
#ifndef HAVE_CUDA
(void) _src;
(void) stream;
throw_no_cuda();
#else
GpuMat src;
if (_src.kind() == _InputArray::CUDA_GPU_MAT)
{
src = _src.getGpuMat();
@ -361,15 +360,12 @@ GpuMat cv::cuda::getInputMat(InputArray _src, Stream& stream)
src = pool.getBuffer(_src.size(), _src.type());
src.upload(_src, stream);
}
#endif
return src;
#endif
}
GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, Stream& stream)
{
GpuMat dst;
#ifndef HAVE_CUDA
(void) _dst;
(void) rows;
@ -378,6 +374,7 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
(void) stream;
throw_no_cuda();
#else
GpuMat dst;
if (_dst.kind() == _InputArray::CUDA_GPU_MAT)
{
_dst.create(rows, cols, type);
@ -388,9 +385,8 @@ GpuMat cv::cuda::getOutputMat(OutputArray _dst, int rows, int cols, int type, St
BufferPool pool(stream);
dst = pool.getBuffer(rows, cols, type);
}
#endif
return dst;
#endif
}
void cv::cuda::syncOutput(const GpuMat& dst, OutputArray _dst, Stream& stream)

@ -490,6 +490,7 @@ double CvCapture_OpenNI2::getCommonProperty( int propIdx ) const
break;
case CV_CAP_PROP_OPENNI2_SYNC :
propValue = const_cast<CvCapture_OpenNI2 *>(this)->device.getDepthColorSyncEnabled();
break;
case CV_CAP_PROP_OPENNI2_MIRROR:
{
bool isMirroring = false;

Loading…
Cancel
Save