remove gcc_unused

[[maybe_unused]] (introduced in C++17) is standard C++.

https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-03-12 12:56:11 -07:00
parent 0afb156a5b
commit 97425d56e7
101 changed files with 226 additions and 234 deletions

View File

@@ -36,7 +36,7 @@ MemoryStorageDirectoryReader::Read() noexcept
}
StorageFileInfo
MemoryStorageDirectoryReader::GetInfo(gcc_unused bool follow)
MemoryStorageDirectoryReader::GetInfo([[maybe_unused]] bool follow)
{
assert(!first);
assert(!entries.empty());

View File

@@ -22,7 +22,7 @@
#include "fs/Traits.hxx"
AllocatedPath
Storage::MapFS(gcc_unused const char *uri_utf8) const noexcept
Storage::MapFS([[maybe_unused]] const char *uri_utf8) const noexcept
{
return nullptr;
}

View File

@@ -315,7 +315,7 @@ private:
/* virtual methods from CommonExpatParser */
void StartElement(const XML_Char *name,
gcc_unused const XML_Char **attrs) final {
[[maybe_unused]] const XML_Char **attrs) final {
switch (state) {
case State::ROOT:
if (strcmp(name, "DAV:|response") == 0)
@@ -447,7 +447,7 @@ protected:
};
StorageFileInfo
CurlStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
CurlStorage::GetInfo(const char *uri_utf8, [[maybe_unused]] bool follow)
{
// TODO: escape the given URI

View File

@@ -288,7 +288,7 @@ protected:
connection.Lstat(path, *this);
}
void HandleResult(gcc_unused unsigned status, void *data) noexcept override {
void HandleResult([[maybe_unused]] unsigned status, void *data) noexcept override {
Copy(info, *(const struct nfs_stat_64 *)data);
}
};
@@ -356,7 +356,7 @@ protected:
connection.OpenDirectory(path, *this);
}
void HandleResult(gcc_unused unsigned status,
void HandleResult([[maybe_unused]] unsigned status,
void *data) noexcept override {
auto *const dir = (struct nfsdir *)data;

View File

@@ -117,7 +117,7 @@ GetInfo(const char *path)
}
StorageFileInfo
SmbclientStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
SmbclientStorage::GetInfo(const char *uri_utf8, [[maybe_unused]] bool follow)
{
const std::string mapped = MapUTF8(uri_utf8);
return ::GetInfo(mapped.c_str());
@@ -172,14 +172,14 @@ SmbclientDirectoryReader::Read() noexcept
}
StorageFileInfo
SmbclientDirectoryReader::GetInfo(gcc_unused bool follow)
SmbclientDirectoryReader::GetInfo([[maybe_unused]] bool follow)
{
const std::string path = PathTraitsUTF8::Build(base.c_str(), name);
return ::GetInfo(path.c_str());
}
static std::unique_ptr<Storage>
CreateSmbclientStorageURI(gcc_unused EventLoop &event_loop, const char *base)
CreateSmbclientStorageURI([[maybe_unused]] EventLoop &event_loop, const char *base)
{
if (!StringStartsWithCaseASCII(base, "smb://"))
return nullptr;