From 4eb6779ea8025610d6b2040362e5950c722e4342 Mon Sep 17 00:00:00 2001 From: Qyriad Date: Sun, 19 May 2024 12:32:13 -0600 Subject: [PATCH] fix -Wdeprecated-copy on clang (BaseError copy assignment) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2bbe3efd1ยน added the -Wdeprecated-copy warning, and fixed the instances of it which GCC warned about, in HintFmt and ref. However, when building with Clang, there is an additional deprecated-copy warning in BaseError. This commit explicitly defaults the copy assignment operator for BaseError and silences this warning. 1: 2bbe3efd169534f538184ff788eecb398ead70a4 Change-Id: I50aa4a7ab1a7aae5d7b31f765994abd3db06379d --- src/libutil/error.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libutil/error.hh b/src/libutil/error.hh index 924366580..323365d65 100644 --- a/src/libutil/error.hh +++ b/src/libutil/error.hh @@ -110,6 +110,8 @@ protected: public: BaseError(const BaseError &) = default; + BaseError & operator=(BaseError const & rhs) = default; + template BaseError(unsigned int status, const Args & ... args) : err { .level = lvlError, .msg = HintFmt(args...), .status = status }