Make dbus-sensors compile with clang-13
clang-13 finds a lot more warnings for unused variables than it used to,
and also picks up some warnings about errant std::moves that are in
place.
This commit fixes them.
Tested:
code compiles against clang-13
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I80864287b7131acfe936c4b28afaf34ababb3029
diff --git a/src/TachSensor.cpp b/src/TachSensor.cpp
index 7242c96..d2afba7 100644
--- a/src/TachSensor.cpp
+++ b/src/TachSensor.cpp
@@ -38,7 +38,6 @@
#include <vector>
static constexpr unsigned int pwmPollMs = 500;
-static constexpr size_t warnAfterErrorCount = 10;
TachSensor::TachSensor(const std::string& path, const std::string& objectType,
sdbusplus::asio::object_server& objectServer,
@@ -204,8 +203,8 @@
PresenceSensor::PresenceSensor(const std::string& gpioName, bool inverted,
boost::asio::io_service& io,
const std::string& name) :
- inverted(inverted),
- gpioLine(gpiod::find_line(gpioName)), gpioFd(io), name(name)
+ gpioLine(gpiod::find_line(gpioName)),
+ gpioFd(io), name(name)
{
if (!gpioLine)
{