Skip to content

Commit

Permalink
compiler warnings
Browse files Browse the repository at this point in the history
Summary: This is a cleaner version of D51550307.

Reviewed By: h-friederich

Differential Revision: D51698161

fbshipit-source-id: 471ead81e1669c74e33dbba7be7c4f1eba3fe2a5
  • Loading branch information
Georges Berenger authored and facebook-github-bot committed Nov 30, 2023
1 parent abe7874 commit aee93be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
11 changes: 2 additions & 9 deletions vrs/FileDelegator.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@

#pragma once

#include <cstdint>

#include <functional>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <vrs/ErrorCode.h>
#include <vrs/FileSpec.h>
#include <vrs/os/CompilerAttributes.h>

namespace vrs {

Expand Down Expand Up @@ -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();
}
};
Expand Down
11 changes: 4 additions & 7 deletions vrs/FileHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@

#include <functional>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <vrs/FileDelegator.h>
#include <vrs/FileSpec.h>
#include <vrs/helpers/EnumTemplates.hpp>
#include <vrs/os/CompilerAttributes.h>

namespace vrs {

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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<std::pair<size_t, size_t>>& sequence,
bool clearSequence = true) {
(void)sequence;
(void)clearSequence;
MAYBE_UNUSED const vector<std::pair<size_t, size_t>>& sequence,
MAYBE_UNUSED bool clearSequence = true) {
return false;
}

Expand Down

0 comments on commit aee93be

Please sign in to comment.