summaryrefslogtreecommitdiff
path: root/redfish-core/include/event_service_manager.hpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-07 20:30:41 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 22:00:37 +0300
commitd3a9e08452986b28c8024de2b0fdb3cadbf4411b (patch)
treef9dfbc45cfdf3c58a9e03e5c8d98cc199c417243 /redfish-core/include/event_service_manager.hpp
parentca45aa3c416e55027b8d17078bac6493e81d564f (diff)
downloadbmcweb-d3a9e08452986b28c8024de2b0fdb3cadbf4411b.tar.xz
Enforce variable init
There were a few places we weren't initting our variables per cpp core guidelines. Fix all of them, and enable checks for this. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iba09924beb9fb26f597ff94d1cecbd6d6b1af912
Diffstat (limited to 'redfish-core/include/event_service_manager.hpp')
-rw-r--r--redfish-core/include/event_service_manager.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/redfish-core/include/event_service_manager.hpp b/redfish-core/include/event_service_manager.hpp
index 7cb5cc7cb7..ee402b61ee 100644
--- a/redfish-core/include/event_service_manager.hpp
+++ b/redfish-core/include/event_service_manager.hpp
@@ -564,9 +564,9 @@ class Subscription : public persistent_data::UserSubscription
class EventServiceManager
{
private:
- bool serviceEnabled;
- uint32_t retryAttempts;
- uint32_t retryTimeoutInterval;
+ bool serviceEnabled = false;
+ uint32_t retryAttempts = 0;
+ uint32_t retryTimeoutInterval = 0;
EventServiceManager()
{
@@ -1189,7 +1189,8 @@ class EventServiceManager
std::size_t index = 0;
while ((index + iEventSize) <= bytesTransferred)
{
- struct inotify_event event;
+ struct inotify_event event
+ {};
std::memcpy(&event, &readBuffer[index], iEventSize);
if (event.wd == dirWatchDesc)
{