From 52a16b7e5981fbb3e1b8eac8404b17350b2623c0 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Wed, 8 May 2024 18:50:03 -0600 Subject: [PATCH] add and fix -Wdeprecated-copy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit *so* many warnings, from only two definitions Change-Id: If2561cd500c05a1e33cce984faf9f3e42a8a95ac Signed-off-by: Jörg Thalheim --- Makefile | 2 +- src/libutil/fmt.hh | 2 ++ src/libutil/ref.hh | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea0754fa5..cb6eeb573 100644 --- a/Makefile +++ b/Makefile @@ -98,7 +98,7 @@ ifdef HOST_WINDOWS GLOBAL_LDFLAGS += -Wl,--export-all-symbols endif -GLOBAL_CXXFLAGS += -g -Wall -Wimplicit-fallthrough -include $(buildprefix)config.h -std=c++2a -I src +GLOBAL_CXXFLAGS += -g -Wall -Wdeprecated-copy -Wimplicit-fallthrough -include $(buildprefix)config.h -std=c++2a -I src # Include the main lib, causing rules to be defined diff --git a/src/libutil/fmt.hh b/src/libutil/fmt.hh index c178257d4..ef44a8409 100644 --- a/src/libutil/fmt.hh +++ b/src/libutil/fmt.hh @@ -182,6 +182,8 @@ public: return *this; } + HintFmt & operator=(HintFmt const & rhs) = default; + std::string str() const { return fmt.str(); diff --git a/src/libutil/ref.hh b/src/libutil/ref.hh index 5d0c3696d..03aa64273 100644 --- a/src/libutil/ref.hh +++ b/src/libutil/ref.hh @@ -77,6 +77,8 @@ public: return ref((std::shared_ptr) p); } + ref & operator=(ref const & rhs) = default; + bool operator == (const ref & other) const { return p == other.p;