From d1539148656e8b3a8486bbc57df57168cb48403b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 20 Aug 2019 16:15:17 +0800 Subject: [PATCH] osd: always initialize local variable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit to silence a GCC warning like: ../src/osd/OSD.cc:4608:24: warning: ‘sender_delta_ub’ may be used uninitialized in this function [-Wmaybe-uninitialized] 4608 | ceph::signedspan sender_delta_ub; | ^~~~~~~~~~~~~~~ Signed-off-by: Kefu Chai --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5d53df9b34863..b99b670cfad12 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4605,7 +4605,7 @@ void OSD::handle_osd_ping(MOSDPing *m) } } - ceph::signedspan sender_delta_ub; + ceph::signedspan sender_delta_ub{}; s->stamps->got_ping( m->up_from, mnow, -- 2.39.5