Add [[maybe_unused]] to silence unhelpful warnings
This commit is contained in:
16
cli.cpp
16
cli.cpp
@ -54,7 +54,7 @@ std::pair<bool, std::string> CLIHandler::user_add(const std::vector<std::string>
|
||||
return {true, ""};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::user_change_pw(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::user_change_pw([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
std::string username = args.at(0);
|
||||
std::string password = args.at(1);
|
||||
@ -81,13 +81,13 @@ std::pair<bool, std::string> CLIHandler::user_change_pw(const std::vector<std::s
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::user_rename(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::user_rename([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
|
||||
return {true, ""};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::user_set_perms(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::user_set_perms([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
auto userDao = this->db->createUserDao();
|
||||
std::string username = args.at(0);
|
||||
@ -107,7 +107,7 @@ std::pair<bool, std::string> CLIHandler::user_set_perms(const std::vector<std::s
|
||||
return {false, "User not found"};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::user_list(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::user_list([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
auto userDao = this->db->createUserDao();
|
||||
QueryOption o;
|
||||
@ -138,7 +138,7 @@ std::pair<bool, std::string> CLIHandler::user_show(const std::vector<std::string
|
||||
return {false, "User not found"};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::page_list(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::page_list([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
auto pageDao = this->db->createPageDao();
|
||||
QueryOption o;
|
||||
@ -163,7 +163,7 @@ std::pair<bool, std::string> CLIHandler::pageperms_set_permissions(const std::ve
|
||||
return {true, ""};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::attach(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::attach([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
/* TODO: consider authentication */
|
||||
pid_t pid = getpid();
|
||||
@ -245,12 +245,12 @@ std::pair<std::string, std::vector<std::string>> CLIHandler::splitCommand(std::s
|
||||
return {cmd, splitted};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::version(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::version([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
return {true, get_version_string()};
|
||||
}
|
||||
|
||||
std::pair<bool, std::string> CLIHandler::category_list(const std::vector<std::string> &args)
|
||||
std::pair<bool, std::string> CLIHandler::category_list([[maybe_unused]] const std::vector<std::string> &args)
|
||||
{
|
||||
auto categoryDao = this->db->createCategoryDao();
|
||||
auto categories = categoryDao->fetchList(QueryOption{});
|
||||
|
Reference in New Issue
Block a user