1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:37:34 +00:00

Kernel: Add missing override specifiers

The `#pragma GCC diagnostic` part is needed because the class has
virtual methods with the same name but different arguments, and Clang
tries to warn us that we are not actually overriding anything with
these.

Weirdly enough, GCC does not seem to care.
This commit is contained in:
Daniel Bertalan 2021-06-24 14:04:41 +02:00 committed by Ali Mohammad Pur
parent 33a341f5e1
commit b97a00d4b1
10 changed files with 14 additions and 11 deletions

View file

@ -30,7 +30,7 @@ private:
virtual const char* class_name() const override { return "MemoryDevice"; }
virtual bool can_read(const FileDescription&, size_t) const override { return true; }
virtual bool can_write(const FileDescription&, size_t) const override { return false; }
virtual bool is_seekable() const { return true; }
virtual bool is_seekable() const override { return true; }
virtual KResultOr<size_t> read(FileDescription&, u64, UserOrKernelBuffer&, size_t) override;
virtual KResultOr<size_t> write(FileDescription&, u64, const UserOrKernelBuffer&, size_t) override { return -EINVAL; }