diff --git a/apps/haartraining/createsamples.cpp b/apps/haartraining/createsamples.cpp index 4d01fbd10f..f0a8eabe52 100644 --- a/apps/haartraining/createsamples.cpp +++ b/apps/haartraining/createsamples.cpp @@ -52,6 +52,11 @@ #include #include +// std::auto_ptr +#if defined(__GNUC__) && __GNUC__ >= 6 +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + using namespace std; #include "cvhaartraining.h" diff --git a/modules/core/src/gpumat.cpp b/modules/core/src/gpumat.cpp index 96691919fd..5065deb58a 100644 --- a/modules/core/src/gpumat.cpp +++ b/modules/core/src/gpumat.cpp @@ -700,7 +700,7 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type) size_t esz = elemSize(); - void* devPtr; + void* devPtr = NULL; gpuFuncTable()->mallocPitch(&devPtr, &step, esz * cols, rows); // Single row must be continuous diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp index de16982627..088b5242d2 100644 --- a/modules/gpu/include/opencv2/gpu/gpu.hpp +++ b/modules/gpu/include/opencv2/gpu/gpu.hpp @@ -54,6 +54,12 @@ #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/features2d/features2d.hpp" +// std::auto_ptr +#if defined(__GNUC__) && __GNUC__ >= 6 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + namespace cv { namespace gpu { //////////////////////////////// CudaMem //////////////////////////////// @@ -2527,4 +2533,8 @@ CV_EXPORTS void calcWobbleSuppressionMaps( } // namespace cv +#if defined(__GNUC__) && __GNUC__ >= 6 +#pragma GCC diagnostic pop +#endif + #endif /* __OPENCV_GPU_HPP__ */