From aee93be0fbe6f1530d8f2ac8c8ddb99b25b16401 Mon Sep 17 00:00:00 2001 From: Georges Berenger Date: Thu, 30 Nov 2023 04:00:32 -0800 Subject: [PATCH] compiler warnings Summary: This is a cleaner version of D51550307. Reviewed By: h-friederich Differential Revision: D51698161 fbshipit-source-id: 471ead81e1669c74e33dbba7be7c4f1eba3fe2a5 --- vrs/FileDelegator.h | 11 ++--------- vrs/FileHandler.h | 11 ++++------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/vrs/FileDelegator.h b/vrs/FileDelegator.h index fb1f10f4..f2a226dd 100644 --- a/vrs/FileDelegator.h +++ b/vrs/FileDelegator.h @@ -16,17 +16,11 @@ #pragma once -#include - -#include -#include #include -#include -#include -#include #include #include +#include namespace vrs { @@ -57,8 +51,7 @@ class FileDelegator { /// @return A status code, 0 on success, which doesn't necessarily mean that the file/object /// exists or can be opened, merely, that parsing the URI did not fail. /// On success, any of the fields may have been set or changed, including fileHandlerName and URI. - virtual int parseUri(FileSpec& inOutFileSpec, size_t colonIndex) const { - (void)colonIndex; + virtual int parseUri(FileSpec& inOutFileSpec, MAYBE_UNUSED size_t colonIndex) const { return inOutFileSpec.parseUri(); } }; diff --git a/vrs/FileHandler.h b/vrs/FileHandler.h index 845f273c..e5910f7a 100644 --- a/vrs/FileHandler.h +++ b/vrs/FileHandler.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include namespace vrs { @@ -135,8 +135,7 @@ class FileHandler : public FileDelegator { /// Check if a number of bytes are available for immediate return (e.g. on disk or in-cache) /// @param length: the number of bytes to check availability of. /// @return true if available, false if unavailable (e.g. requiring a network fetch) - virtual bool isAvailableOrPrefetch(size_t length) { - (void)length; + virtual bool isAvailableOrPrefetch(MAYBE_UNUSED size_t length) { return !isRemoteFileSystem(); } /// Read a number of bytes, in a chunk aware way. @@ -210,10 +209,8 @@ class FileHandler : public FileDelegator { /// caching starts. /// @return True if the file handler support custom read sequences. virtual bool prefetchReadSequence( - const vector>& sequence, - bool clearSequence = true) { - (void)sequence; - (void)clearSequence; + MAYBE_UNUSED const vector>& sequence, + MAYBE_UNUSED bool clearSequence = true) { return false; }