Addressed various warnings (#4414)

This commit is contained in:
Cœur
2022-12-22 04:21:16 +08:00
committed by GitHub
parent c74ac4f4ed
commit db802afc4f
33 changed files with 199 additions and 266 deletions

View File

@@ -418,7 +418,7 @@ static tr_rpc_callback_status on_rpc_callback(
return TR_RPC_OK;
}
bool tr_daemon::parse_args(int argc, char const** argv, bool* dump_settings, bool* foreground, int* exit_code)
bool tr_daemon::parse_args(int argc, char const* const* argv, bool* dump_settings, bool* foreground, int* exit_code)
{
int c;
char const* optstr;
@@ -877,9 +877,9 @@ CLEANUP:
return 0;
}
bool tr_daemon::init(int argc, char* argv[], bool* foreground, int* ret)
bool tr_daemon::init(int argc, char const* const argv[], bool* foreground, int* ret)
{
config_dir_ = getConfigDir(argc, (char const* const*)argv);
config_dir_ = getConfigDir(argc, argv);
/* load settings from defaults + config file */
tr_variantInitDict(&settings_, 0);
@@ -891,7 +891,7 @@ bool tr_daemon::init(int argc, char* argv[], bool* foreground, int* ret)
*ret = 0;
/* overwrite settings from the command line */
if (!parse_args(argc, (char const**)argv, &dumpSettings, foreground, ret))
if (!parse_args(argc, argv, &dumpSettings, foreground, ret))
{
goto EXIT_EARLY;
}