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/ExternalSensor.cpp b/src/ExternalSensor.cpp
index 17f5300..745c65b 100644
--- a/src/ExternalSensor.cpp
+++ b/src/ExternalSensor.cpp
@@ -95,7 +95,7 @@
// Connect ExternalSensor with Sensor
auto weakThis = weak_from_this();
- externalSetHook = std::move([weakThis]() {
+ externalSetHook = [weakThis]() {
auto lockThis = weakThis.lock();
if (lockThis)
{
@@ -106,7 +106,7 @@
{
std::cerr << "ExternalSensor receive ignored, sensor gone\n";
}
- });
+ };
}
ExternalSensor::~ExternalSensor()