From 81f915565669ab5a7e84159c1b4ceb53ef5ef0c6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 11 Jan 2020 22:30:49 +0800 Subject: [PATCH] src/: mark final class as final to silence warnings from clang-10 like: ``` ../src/os/bluestore/ceph_aio.h:120:18: warning: class with destructor marked 'final' cannot be inherited from [-Wfinal-dtor-non-final-class] ~aio_queue_t() final { ^ ../src/os/bluestore/ceph_aio.h:108:8: note: mark 'aio_queue_t' as 'final' to silence this warning struct aio_queue_t : public io_queue_t { ^ 1 warning generated. ``` Signed-off-by: Kefu Chai --- src/os/bluestore/ceph_aio.h | 2 +- src/osd/scheduler/OpScheduler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os/bluestore/ceph_aio.h b/src/os/bluestore/ceph_aio.h index 17c7989203fbd..77a3e771da97e 100644 --- a/src/os/bluestore/ceph_aio.h +++ b/src/os/bluestore/ceph_aio.h @@ -105,7 +105,7 @@ struct io_queue_t { virtual int get_next_completed(int timeout_ms, aio_t **paio, int max) = 0; }; -struct aio_queue_t : public io_queue_t { +struct aio_queue_t final : public io_queue_t { int max_iodepth; #if defined(HAVE_LIBAIO) io_context_t ctx; diff --git a/src/osd/scheduler/OpScheduler.h b/src/osd/scheduler/OpScheduler.h index ae770a72b27e2..4f95dfe1da2b6 100644 --- a/src/osd/scheduler/OpScheduler.h +++ b/src/osd/scheduler/OpScheduler.h @@ -66,7 +66,7 @@ OpSchedulerRef make_scheduler(CephContext *cct); * OpQueue based implementations. */ template -class ClassedOpQueueScheduler : public OpScheduler { +class ClassedOpQueueScheduler final : public OpScheduler { unsigned cutoff; T queue; -- 2.39.5