Skip to content

Commit 19270ee

Browse files
committed
warnings
1 parent 497d0fd commit 19270ee

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

apps/haartraining/createsamples.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
#include <ctime>
5353
#include <memory>
5454

55+
// std::auto_ptr
56+
#if defined(__GNUC__) && __GNUC__ >= 6
57+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
58+
#endif
59+
5560
using namespace std;
5661

5762
#include "cvhaartraining.h"

modules/core/src/gpumat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ void cv::gpu::GpuMat::create(int _rows, int _cols, int _type)
700700

701701
size_t esz = elemSize();
702702

703-
void* devPtr;
703+
void* devPtr = NULL;
704704
gpuFuncTable()->mallocPitch(&devPtr, &step, esz * cols, rows);
705705

706706
// Single row must be continuous

modules/gpu/include/opencv2/gpu/gpu.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@
5454
#include "opencv2/objdetect/objdetect.hpp"
5555
#include "opencv2/features2d/features2d.hpp"
5656

57+
// std::auto_ptr
58+
#if defined(__GNUC__) && __GNUC__ >= 6
59+
#pragma GCC diagnostic push
60+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
61+
#endif
62+
5763
namespace cv { namespace gpu {
5864

5965
//////////////////////////////// CudaMem ////////////////////////////////
@@ -2527,4 +2533,8 @@ CV_EXPORTS void calcWobbleSuppressionMaps(
25272533

25282534
} // namespace cv
25292535

2536+
#if defined(__GNUC__) && __GNUC__ >= 6
2537+
#pragma GCC diagnostic pop
2538+
#endif
2539+
25302540
#endif /* __OPENCV_GPU_HPP__ */

0 commit comments

Comments
 (0)