build: eliminate uninitialized warnings from GCC12

pull/22512/head
Alexander Alekhin 2 years ago
parent e24382691f
commit 2e15582799
  1. 10
      modules/core/include/opencv2/core/hal/intrin.hpp
  2. 10
      modules/imgproc/src/sumpixels.avx512_skx.hpp

@ -50,6 +50,12 @@
#include <stdlib.h>
#include "opencv2/core/cvdef.h"
#if defined(__GNUC__) && __GNUC__ == 12
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
#define OPENCV_HAL_ADD(a, b) ((a) + (b))
#define OPENCV_HAL_AND(a, b) ((a) & (b))
#define OPENCV_HAL_NOP(a) (a)
@ -695,4 +701,8 @@ CV_CPU_OPTIMIZATION_HAL_NAMESPACE_END
//! @endcond
#if defined(__GNUC__) && __GNUC__ == 12
#pragma GCC diagnostic pop
#endif
#endif

@ -6,6 +6,12 @@
#include "opencv2/core/hal/intrin.hpp"
#if defined(__GNUC__) && __GNUC__ == 12
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuninitialized"
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
namespace cv { namespace hal {
CV_CPU_OPTIMIZATION_NAMESPACE_BEGIN
@ -465,3 +471,7 @@ void calculate_integral_avx512(const uchar *src, size_t _srcstep,
CV_CPU_OPTIMIZATION_NAMESPACE_END
}} // end namespace cv::hal
#if defined(__GNUC__) && __GNUC__ == 12
#pragma GCC diagnostic pop
#endif

Loading…
Cancel
Save