diff options
-rw-r--r-- | fastlib/src/vespa/fastlib/io/bufferedfile.h | 4 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/file.h | 4 | ||||
-rw-r--r-- | fastos/src/vespa/fastos/unix_file.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/fastlib/src/vespa/fastlib/io/bufferedfile.h b/fastlib/src/vespa/fastlib/io/bufferedfile.h index 014223c9b93..cdeb817b0de 100644 --- a/fastlib/src/vespa/fastlib/io/bufferedfile.h +++ b/fastlib/src/vespa/fastlib/io/bufferedfile.h @@ -186,7 +186,7 @@ public: /** * Force completion of pending disk writes (flush cache). */ - bool Sync() override; + [[nodiscard]] bool Sync() override; /** * Get the time the file was last modified. * @@ -208,7 +208,7 @@ public: * Flush the buffer, and close the file instance. * @return The result of the Close operation. */ - bool Close () override; + [[nodiscard]] bool Close () override; /** * Get the buffered file position, in bytes. * This takes into account the data in the buffer, that has diff --git a/fastos/src/vespa/fastos/file.h b/fastos/src/vespa/fastos/file.h index a352c6281a3..aa8f495d064 100644 --- a/fastos/src/vespa/fastos/file.h +++ b/fastos/src/vespa/fastos/file.h @@ -309,7 +309,7 @@ public: * already is closed. * @return Boolean success/failure */ - virtual bool Close() = 0; + [[nodiscard]] virtual bool Close() = 0; /** * Is the file currently opened? @@ -439,7 +439,7 @@ public: /** * Force completion of pending disk writes (flush cache). */ - virtual bool Sync() = 0; + [[nodiscard]] virtual bool Sync() = 0; /** * Are we in some kind of file read mode? diff --git a/fastos/src/vespa/fastos/unix_file.h b/fastos/src/vespa/fastos/unix_file.h index c0a908a5948..891b5e0dba7 100644 --- a/fastos/src/vespa/fastos/unix_file.h +++ b/fastos/src/vespa/fastos/unix_file.h @@ -61,7 +61,7 @@ public: ssize_t Read(void *buffer, size_t len) override; ssize_t Write2(const void *buffer, size_t len) override; bool Open(unsigned int openFlags, const char *filename) override; - bool Close() override; + [[nodiscard]] bool Close() override; bool IsOpened() const override { return _filedes >= 0; } void enableMemoryMap(int flags) override { @@ -87,7 +87,7 @@ public: int64_t GetSize() override; time_t GetModificationTime() override; bool Delete() override; - bool Sync() override; + [[nodiscard]] bool Sync() override; bool SetSize(int64_t newSize) override; void dropFromCache() const override; |