meson support: remove code warnings 1
This commit contains code changes necessary to support the increased
warning level from Meson builds. Most changes are for unused variables.
To keep the review size manageable, this commit contains only monitor
and presence changes (and top-level json_config.hpp).
Signed-off-by: Mike Capps <mikepcapps@gmail.com>
Change-Id: I7280b512c54e8d5aeba3300764a239f3dcbab14d
diff --git a/sdbusplus.hpp b/sdbusplus.hpp
index 909fbc3..0f5b0be 100644
--- a/sdbusplus.hpp
+++ b/sdbusplus.hpp
@@ -401,6 +401,22 @@
return getPropertyVariant<Variant>(getBus(), path, interface, property);
}
+ /** @brief Invoke a method and return without checking for error. */
+ template <typename... Args>
+ static auto callMethodAndReturn(sdbusplus::bus::bus& bus,
+ const std::string& busName,
+ const std::string& path,
+ const std::string& interface,
+ const std::string& method, Args&&... args)
+ {
+ auto reqMsg = bus.new_method_call(busName.c_str(), path.c_str(),
+ interface.c_str(), method.c_str());
+ reqMsg.append(std::forward<Args>(args)...);
+ auto respMsg = bus.call(reqMsg);
+
+ return respMsg;
+ }
+
/** @brief Get a property without mapper lookup. */
template <typename Property>
static auto getProperty(sdbusplus::bus::bus& bus,
@@ -573,22 +589,6 @@
return lookupCallMethodAndRead<Ret>(getBus(), path, interface, method,
std::forward<Args>(args)...);
}
-
- /** @brief Invoke a method and return without checking for error. */
- template <typename... Args>
- static auto callMethodAndReturn(sdbusplus::bus::bus& bus,
- const std::string& busName,
- const std::string& path,
- const std::string& interface,
- const std::string& method, Args&&... args)
- {
- auto reqMsg = bus.new_method_call(busName.c_str(), path.c_str(),
- interface.c_str(), method.c_str());
- reqMsg.append(std::forward<Args>(args)...);
- auto respMsg = bus.call(reqMsg);
-
- return respMsg;
- }
};
} // namespace util