Make code compile on clang again
The usual updates to make code compile on clang again. Extra semicolons
that have snuck in, missing inline and static definitions.
Tested: Code compiles on clang.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Id7f889de98cafaa89471d75ed3e3bb97ab3855cd
diff --git a/http/http_client.hpp b/http/http_client.hpp
index 06d4a1c..d35ddd4 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -615,7 +615,7 @@
{
BMCWEB_LOG_DEBUG << "Response handled with return code: "
<< std::to_string(res.resultInt());
- };
+ }
public:
HttpClient(const HttpClient&) = delete;
diff --git a/redfish-core/include/utils/query_param_test.cpp b/redfish-core/include/utils/query_param_test.cpp
index a87d954..97f9c38 100644
--- a/redfish-core/include/utils/query_param_test.cpp
+++ b/redfish-core/include/utils/query_param_test.cpp
@@ -315,7 +315,7 @@
namespace redfish::query_param
{
// NOLINTNEXTLINE(readability-identifier-naming)
-void PrintTo(const ExpandNode& value, ::std::ostream* os)
+static void PrintTo(const ExpandNode& value, ::std::ostream* os)
{
*os << "ExpandNode: " << value.location << " " << value.uri;
}
diff --git a/redfish-core/lib/redfish_sessions.hpp b/redfish-core/lib/redfish_sessions.hpp
index 89008c9..05e7fdc 100644
--- a/redfish-core/lib/redfish_sessions.hpp
+++ b/redfish-core/lib/redfish_sessions.hpp
@@ -151,7 +151,7 @@
asyncResp->res.jsonValue = getSessionCollectionMembers();
}
-void handleSessionCollectionPost(
+inline void handleSessionCollectionPost(
crow::App& app, const crow::Request& req,
const std::shared_ptr<bmcweb::AsyncResp>& asyncResp)
{
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp
index b09b582..0c4203d 100644
--- a/redfish-core/lib/sensors.hpp
+++ b/redfish-core/lib/sensors.hpp
@@ -47,12 +47,12 @@
// clang-format off
namespace dbus
{
-auto powerPaths = std::to_array<std::string_view>({
+static auto powerPaths = std::to_array<std::string_view>({
"/xyz/openbmc_project/sensors/voltage",
"/xyz/openbmc_project/sensors/power"
});
-auto sensorPaths = std::to_array<std::string_view>({
+static auto sensorPaths = std::to_array<std::string_view>({
"/xyz/openbmc_project/sensors/power",
"/xyz/openbmc_project/sensors/current",
"/xyz/openbmc_project/sensors/airflow",
@@ -68,7 +68,7 @@
"/xyz/openbmc_project/sensors/utilization"
});
-auto thermalPaths = std::to_array<std::string_view>({
+static auto thermalPaths = std::to_array<std::string_view>({
"/xyz/openbmc_project/sensors/fan_tach",
"/xyz/openbmc_project/sensors/temperature",
"/xyz/openbmc_project/sensors/fan_pwm"