summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy3
-rw-r--r--include/multipart_parser.hpp2
-rw-r--r--redfish-core/include/event_service_manager.hpp21
-rw-r--r--redfish-core/include/gzfile.hpp2
-rw-r--r--redfish-core/lib/task.hpp2
5 files changed, 15 insertions, 15 deletions
diff --git a/.clang-tidy b/.clang-tidy
index 6412a663f5..dfca83aa15 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -272,11 +272,14 @@ readability-avoid-const-params-in-decls,
readability-braces-around-statements,
readability-const-return-type,
readability-container-size-empty,
+readability-convert-member-functions-to-static,
readability-delete-null-pointer,
readability-deleted-default,
readability-else-after-return,
readability-implicit-bool-conversion,
+readability-make-member-function-const,
readability-named-parameter,
+readability-non-const-parameter,
readability-redundant-control-flow,
readability-redundant-declaration,
readability-redundant-function-ptr-dereference,
diff --git a/include/multipart_parser.hpp b/include/multipart_parser.hpp
index ee028f1d3e..945ebf900e 100644
--- a/include/multipart_parser.hpp
+++ b/include/multipart_parser.hpp
@@ -219,7 +219,7 @@ class MultipartParser
}
}
- char lower(char c) const
+ static char lower(char c)
{
return static_cast<char>(c | 0x20);
}
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 6cb95c4c5c..e6e694f65d 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -663,7 +663,7 @@ class EventServiceManager
}
}
- void loadOldBehavior()
+ static void loadOldBehavior()
{
std::ifstream eventConfigFile(eventServiceFile);
if (!eventConfigFile.good())
@@ -1312,8 +1312,14 @@ class EventServiceManager
}
#endif
- void getReadingsForReport(sdbusplus::message::message& msg)
+ static void getReadingsForReport(sdbusplus::message::message& msg)
{
+ if (msg.is_method_error())
+ {
+ BMCWEB_LOG_ERROR << "TelemetryMonitor Signal error";
+ return;
+ }
+
sdbusplus::message::object_path path(msg.get_path());
std::string id = path.filename();
if (id.empty())
@@ -1380,16 +1386,7 @@ class EventServiceManager
"arg0=xyz.openbmc_project.Telemetry.Report";
matchTelemetryMonitor = std::make_shared<sdbusplus::bus::match::match>(
- *crow::connections::systemBus, matchStr,
- [this](sdbusplus::message::message& msg) {
- if (msg.is_method_error())
- {
- BMCWEB_LOG_ERROR << "TelemetryMonitor Signal error";
- return;
- }
-
- getReadingsForReport(msg);
- });
+ *crow::connections::systemBus, matchStr, getReadingsForReport);
}
};
diff --git a/redfish-core/include/gzfile.hpp b/redfish-core/include/gzfile.hpp
index 567741dfd8..696b13c633 100644
--- a/redfish-core/include/gzfile.hpp
+++ b/redfish-core/include/gzfile.hpp
@@ -38,7 +38,7 @@ class GzFileReader
std::string lastDelimiter;
size_t totalFilesSize = 0;
- void printErrorMessage(gzFile logStream)
+ static void printErrorMessage(gzFile logStream)
{
int errNum = 0;
const char* errMsg = gzerror(logStream, &errNum);
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index b7795a7af2..4ebbc14fce 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -188,7 +188,7 @@ struct TaskData : std::enable_shared_from_this<TaskData>
});
}
- void sendTaskEvent(const std::string_view state, size_t index)
+ static void sendTaskEvent(const std::string_view state, size_t index)
{
std::string origin =
"/redfish/v1/TaskService/Tasks/" + std::to_string(index);