From be9f3826d76703e4e38dd1dc45ebc8a911ce8b07 Mon Sep 17 00:00:00 2001 From: Anton Potapov Date: Mon, 25 May 2020 11:59:28 +0300 Subject: [PATCH] GAPI: fix uninitialized variables in Fluid --- modules/gapi/include/opencv2/gapi/fluid/gfluidbuffer.hpp | 2 +- modules/gapi/src/backends/fluid/gfluidbuffer_priv.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gapi/include/opencv2/gapi/fluid/gfluidbuffer.hpp b/modules/gapi/include/opencv2/gapi/fluid/gfluidbuffer.hpp index de16eb0607..8130e2ba91 100644 --- a/modules/gapi/include/opencv2/gapi/fluid/gfluidbuffer.hpp +++ b/modules/gapi/include/opencv2/gapi/fluid/gfluidbuffer.hpp @@ -87,7 +87,7 @@ public: private: std::unique_ptr m_priv; - const Cache* m_cache; + const Cache* m_cache = nullptr; }; class GAPI_EXPORTS Buffer diff --git a/modules/gapi/src/backends/fluid/gfluidbuffer_priv.hpp b/modules/gapi/src/backends/fluid/gfluidbuffer_priv.hpp index d20d2802cf..d6fdc0eb5f 100644 --- a/modules/gapi/src/backends/fluid/gfluidbuffer_priv.hpp +++ b/modules/gapi/src/backends/fluid/gfluidbuffer_priv.hpp @@ -245,7 +245,7 @@ class GAPI_EXPORTS Buffer::Priv // Coordinate starting from which this buffer is assumed // to be read (with border not being taken into account) - int m_readStart; + int m_readStart = 0; cv::Rect m_roi; friend void debugBufferPriv(const Buffer& p, std::ostream &os);