cppcheck: Fix "Uninitialized variable" warning
It's not clear if this is really a bad programming practice but in the
spirit of getting cppecheck to run without warning, lets change this
over to a clear type
Here's the cppcheck warning this change fixes:
[host_check_main.cpp:116]: (error) Uninitialized variable: s
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: Id9a63a0735d0e6eb698282f14ed1f88c5cf5c4b6
diff --git a/host_check_main.cpp b/host_check_main.cpp
index 182c501..b9f5327 100644
--- a/host_check_main.cpp
+++ b/host_check_main.cpp
@@ -113,8 +113,9 @@
auto bus = sdbusplus::bus::new_default();
- auto s = "type='signal',member='CommandComplete',path='"s +
- CONTROL_HOST_PATH + "',interface='" + CONTROL_HOST_INTERFACE + "'";
+ std::string s = "type='signal',member='CommandComplete',path='"s +
+ CONTROL_HOST_PATH + "',interface='" +
+ CONTROL_HOST_INTERFACE + "'";
// Setup Signal Handler
sdbusplus::bus::match::match hostControlSignals(bus, s.c_str(),