diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-03-12 12:56:11 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-03-16 00:08:21 -0700 |
commit | 97425d56e7ad0ce19357b5d8984de082c0dacffc (patch) | |
tree | ceff26b07d79daa4fd2f93f2d37007f1f52de8f3 /src/command/AllCommands.cxx | |
parent | 0afb156a5bbb23a9602ef3b8188e82e4afe300e4 (diff) |
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>
Diffstat (limited to 'src/command/AllCommands.cxx')
-rw-r--r-- | src/command/AllCommands.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index ba9fc2f62..8797543a6 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -216,8 +216,8 @@ static constexpr unsigned num_commands = std::size(commands); gcc_pure static bool -command_available(gcc_unused const Partition &partition, - gcc_unused const struct command *cmd) noexcept +command_available([[maybe_unused]] const Partition &partition, + [[maybe_unused]] const struct command *cmd) noexcept { #ifdef ENABLE_SQLITE if (StringIsEqual(cmd->cmd, "sticker")) @@ -272,14 +272,14 @@ PrintUnavailableCommands(Response &r, unsigned permission) noexcept /* don't be fooled, this is the command handler for "commands" command */ static CommandResult -handle_commands(Client &client, gcc_unused Request request, Response &r) +handle_commands(Client &client, [[maybe_unused]] Request request, Response &r) { return PrintAvailableCommands(r, client.GetPartition(), client.GetPermission()); } static CommandResult -handle_not_commands(Client &client, gcc_unused Request request, Response &r) +handle_not_commands(Client &client, [[maybe_unused]] Request request, Response &r) { return PrintUnavailableCommands(r, client.GetPermission()); } |