From 914a4d6342a4bac170ef01beeed3037959a2d25f Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 17 Aug 2020 12:00:13 -0700 Subject: [PATCH] Properly initialize Timer::type. Fixes Coverity 1431144. --- src/Conn.h | 2 +- src/Timer.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Conn.h b/src/Conn.h index 881c3920f2..8d1b5b974b 100644 --- a/src/Conn.h +++ b/src/Conn.h @@ -401,7 +401,7 @@ public: void Dispatch(double t, bool is_expire) override; protected: - ConnectionTimer() {} + ConnectionTimer() = default; void Init(Connection* conn, timer_func timer, bool do_expire); diff --git a/src/Timer.h b/src/Timer.h index 02be6f379d..6acb8f7dd0 100644 --- a/src/Timer.h +++ b/src/Timer.h @@ -65,8 +65,8 @@ public: void Describe(ODesc* d) const; protected: - Timer() {} - TimerType type; + Timer() = default; + TimerType type{}; }; class TimerMgr : public iosource::IOSource {