From: Otto Moerbeek Date: Wed, 3 Dec 2025 08:43:01 +0000 (+0100) Subject: Coverity 1643564 Using a moved object X-Git-Tag: rec-5.4.0-alpha1~28^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df4295408a45989826969a86e443d77c7c94503f;p=thirdparty%2Fpdns.git Coverity 1643564 Using a moved object Looks harmless Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/logging.cc b/pdns/recursordist/logging.cc index b72aa308f6..1db6da080e 100644 --- a/pdns/recursordist/logging.cc +++ b/pdns/recursordist/logging.cc @@ -50,7 +50,7 @@ void Logger::info(Logr::Priority prio, const std::string& msg) const void Logger::logMessage(const std::string& msg, const std::optional& err) const { - logMessage(msg, Logr::Absent, std::move(err)); + logMessage(msg, Logr::Absent, err); } void Logger::logMessage(const std::string& msg, Logr::Priority prio, const std::optional& err) const @@ -64,7 +64,7 @@ void Logger::logMessage(const std::string& msg, Logr::Priority prio, const std:: Utility::gettimeofday(&entry.d_timestamp); entry.name = _name; entry.message = msg; - entry.error = std::move(err); + entry.error = err; auto parent = _parent; entry.values.insert(_values.begin(), _values.end()); while (parent) {