Remove build warning
Remove the following warning:
warning: capture of variable ‘powerStatusOn’ with non-automatic storage
duration
No functional impact.
Change-Id: I19b6d7d65aa424662c6972f871e284833fffa9d5
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/Utils.cpp b/src/Utils.cpp
index a5685d5..15fce73 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -120,7 +120,7 @@
// create a match for powergood changes, first time do a method call to
// return the correct value
std::function<void(sdbusplus::message::message & message)> eventHandler =
- [&powerStatusOn](sdbusplus::message::message& message) {
+ [](sdbusplus::message::message& message) {
std::string objectName;
boost::container::flat_map<std::string,
sdbusplus::message::variant<int32_t>>
@@ -142,8 +142,8 @@
eventHandler);
conn->async_method_call(
- [&powerStatusOn](boost::system::error_code ec,
- const sdbusplus::message::variant<int32_t>& pgood) {
+ [](boost::system::error_code ec,
+ const sdbusplus::message::variant<int32_t>& pgood) {
if (ec)
{
std::cerr << "Error getting initial power status\n";
@@ -155,4 +155,4 @@
"Get", powerInterfaceName, "pgood");
return powerStatusOn;
-}
\ No newline at end of file
+}