From d368069ebbafc224b8c7aa21de3e922e7582280a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 28 Nov 2016 22:47:53 -0500 Subject: [PATCH] librbd/ImageCtx: no need for virtual dtor CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR) 1. nonvirtual_dtor: Class librbd::::SafeTimerSingleton has a destructor and a pointer to it is upcast to class SafeTimer which doesn't have a virtual destructor. The SafeTimerSingleton is not polymorphic; no need for a virtual dtor. Signed-off-by: Sage Weil --- src/librbd/ImageCtx.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index 91d9ac0be4fc9..b7d8061834fa2 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -73,7 +73,7 @@ public: lock("librbd::Journal::SafeTimerSingleton::lock") { init(); } - virtual ~SafeTimerSingleton() { + ~SafeTimerSingleton() { Mutex::Locker locker(lock); shutdown(); } -- 2.39.5