1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #3401 from SpecLad:optflow-bogus-Warray-bounds

This commit is contained in:
Vadim Pisarevsky
2014-11-11 13:27:41 +00:00
2 changed files with 19 additions and 4 deletions
+17 -2
View File
@@ -40,6 +40,20 @@
//
//M*/
#if defined(__arm__) && defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)
// While compiling CV_INIT_ALGORITHM(Farneback_GPU, ...) below, GCC emits a bogus
// -Warray-bounds warning in GpuMat::~GpuMat. Also, for some reason, suppressing
// it inside precomp.hpp doesn't work (probably because it's precompiled).
// Thus, we include this before it's included by precomp.hpp.
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#include "opencv2/core/gpumat.hpp"
#pragma GCC diagnostic pop
// Even more strangely, this suppression doesn't work when cross-compiling.
// For that, there's another suppression at the bottom of the file.
#endif
#include "precomp.hpp"
using namespace std;
@@ -986,7 +1000,8 @@ Ptr<DenseOpticalFlowExt> cv::superres::createOptFlow_Farneback_OCL()
#endif
// Suppress specific warnings during cross-compilation for ARM
#if defined(__arm__) && defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)
// Even though this looks as if it covers nothing, it actually suppress a warning in
// CV_INIT_ALGORITHM(Farneback_GPU, ...). See the top comment for more explanation.
#if defined(__arm__) && defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)
# pragma GCC diagnostic ignored "-Warray-bounds"
#endif