commit | f836c1d81313fad026197b36d32313480ada3a21 | [log] [tgz] |
---|---|---|
author | Ed Tanous <etanous@nvidia.com> | Fri Sep 06 16:05:11 2024 -0700 |
committer | Ed Tanous <ed@tanous.net> | Mon Sep 09 23:12:23 2024 +0000 |
tree | f1ce50fcf20d6eaec25a2d292e671c540dfdbfb5 | |
parent | 25ce6206c86e2b08327a83ac14806db01c7062c3 [diff] |
Fix static analysis Making these const means that we can no longer use std::move on this struct, which static analysis flags. [1] https://sonarcloud.io/project/issues?impactSeverities=HIGH&issueStatuses=OPEN%2CCONFIRMED&tags=since-c%2B%2B11&types=CODE_SMELL&id=edtanous_bmcweb&open=AZHJOZJsIkxRoiGIkzZz Change-Id: I10c33f37ce14650962a7840729d75639ee8edb2e Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/redfish-core/lib/sensors.hpp b/redfish-core/lib/sensors.hpp index ddf432e..75ec8b9 100644 --- a/redfish-core/lib/sensors.hpp +++ b/redfish-core/lib/sensors.hpp
@@ -124,9 +124,9 @@ struct SensorData { - const std::string name; + std::string name; std::string uri; - const std::string dbusPath; + std::string dbusPath; }; SensorsAsyncResp(const std::shared_ptr<bmcweb::AsyncResp>& asyncRespIn,