]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/ImageCtx: no need for virtual dtor 12220/head
authorSage Weil <sage@redhat.com>
Tue, 29 Nov 2016 03:47:53 +0000 (22:47 -0500)
committerSage Weil <sage@redhat.com>
Tue, 29 Nov 2016 03:47:53 +0000 (22:47 -0500)
CID 1396232 (#1 of 1): Non-virtual destructor (VIRTUAL_DTOR)
1. nonvirtual_dtor: Class librbd::<unnamed>::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 <sage@redhat.com>
src/librbd/ImageCtx.cc

index 91d9ac0be4fc9a77b693f3d89b9e3c8bc584c226..b7d8061834fa2006044420e42b328070d079fd15 100644 (file)
@@ -73,7 +73,7 @@ public:
         lock("librbd::Journal::SafeTimerSingleton::lock") {
     init();
   }
-  virtual ~SafeTimerSingleton() {
+  ~SafeTimerSingleton() {
     Mutex::Locker locker(lock);
     shutdown();
   }