From d1b5a781711836942082e752e98b0551379c7d7c Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Sat, 5 Dec 2020 19:40:04 +0000 Subject: [PATCH] build warnings - GCC 4.8.5 / CentOS 7 --- modules/dnn/include/opencv2/dnn/dnn.inl.hpp | 1 + modules/gapi/include/opencv2/gapi/util/optional.hpp | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/dnn/include/opencv2/dnn/dnn.inl.hpp b/modules/dnn/include/opencv2/dnn/dnn.inl.hpp index d6809ce3fd..8312a418f3 100644 --- a/modules/dnn/include/opencv2/dnn/dnn.inl.hpp +++ b/modules/dnn/include/opencv2/dnn/dnn.inl.hpp @@ -247,6 +247,7 @@ inline DictValue & DictValue::operator=(const DictValue &r) } inline DictValue::DictValue(const DictValue &r) + : pv(NULL) { type = r.type; diff --git a/modules/gapi/include/opencv2/gapi/util/optional.hpp b/modules/gapi/include/opencv2/gapi/util/optional.hpp index 1aa2b265d9..26d7b64a02 100644 --- a/modules/gapi/include/opencv2/gapi/util/optional.hpp +++ b/modules/gapi/include/opencv2/gapi/util/optional.hpp @@ -35,9 +35,9 @@ namespace util // instead {} optional() {}; optional(const optional&) = default; - explicit optional(T &&value) noexcept; - explicit optional(const T &value) noexcept; - optional(optional &&) noexcept; + explicit optional(T&&) noexcept; + explicit optional(const T&) noexcept; + optional(optional&&) noexcept; // TODO: optional(nullopt_t) noexcept; // TODO: optional(const optional &) // TODO: optional(optional &&) @@ -46,8 +46,8 @@ namespace util // TODO: optional(U&& value); // Assignment - optional& operator=(const optional& rhs) = default; - optional& operator=(optional&& rhs); + optional& operator=(const optional&) = default; + optional& operator=(optional&&); // Observers T* operator-> ();