]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/: mark final class as final
authorKefu Chai <kchai@redhat.com>
Sat, 11 Jan 2020 14:30:49 +0000 (22:30 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 11 Jan 2020 15:16:35 +0000 (23:16 +0800)
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 <kchai@redhat.com>
src/os/bluestore/ceph_aio.h
src/osd/scheduler/OpScheduler.h

index 17c7989203fbd6c03666e4829d8a22a4f92be934..77a3e771da97e0fd6edcbaeb0fa8453f1a4c0a68 100644 (file)
@@ -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;
index ae770a72b27e28e56e005d03549b53e46eaf5439..4f95dfe1da2b623057f9661a2698adfa89264775 100644 (file)
@@ -66,7 +66,7 @@ OpSchedulerRef make_scheduler(CephContext *cct);
  * OpQueue based implementations.
  */
 template <typename T>
-class ClassedOpQueueScheduler : public OpScheduler {
+class ClassedOpQueueScheduler final : public OpScheduler {
   unsigned cutoff;
   T queue;