From: Sage Weil Date: Tue, 29 Nov 2016 03:47:53 +0000 (-0500) Subject: librbd/ImageCtx: no need for virtual dtor X-Git-Tag: v11.1.0~117^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d368069ebbafc224b8c7aa21de3e922e7582280a;p=ceph-ci.git 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 --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index 91d9ac0be4f..b7d8061834f 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(); }