mirror of
https://github.com/transmission/transmission.git
synced 2025-12-20 10:28:32 +00:00
fix const warnings
In particular, in passing argv around as a "const char * const *" instead of a "const char *".
This commit is contained in:
@@ -163,7 +163,7 @@ reopen_log_file (const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char*
|
static const char*
|
||||||
getConfigDir (int argc, const char ** argv)
|
getConfigDir (int argc, const char * const * argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
const char * configDir = NULL;
|
const char * configDir = NULL;
|
||||||
|
|||||||
@@ -1834,7 +1834,7 @@ ensure_tset (tr_variant ** tset)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
processArgs (const char * rpcurl, int argc, const char ** argv)
|
processArgs (const char * rpcurl, int argc, const char * const * argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
int status = EXIT_SUCCESS;
|
int status = EXIT_SUCCESS;
|
||||||
|
|||||||
@@ -187,11 +187,11 @@ findOption (const tr_option * opts,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
tr_getopt (const char * usage,
|
tr_getopt (const char * usage,
|
||||||
int argc,
|
int argc,
|
||||||
const char ** argv,
|
const char * const * argv,
|
||||||
const tr_option * opts,
|
const tr_option * opts,
|
||||||
const char ** setme_optarg)
|
const char ** setme_optarg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char * arg = NULL;
|
const char * arg = NULL;
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ enum
|
|||||||
* @brief similar to getopt ()
|
* @brief similar to getopt ()
|
||||||
* @return TR_GETOPT_DONE, TR_GETOPT_ERR, TR_GETOPT_UNK, or the matching tr_option's `val' field
|
* @return TR_GETOPT_DONE, TR_GETOPT_ERR, TR_GETOPT_UNK, or the matching tr_option's `val' field
|
||||||
*/
|
*/
|
||||||
int tr_getopt (const char * summary,
|
int tr_getopt (const char * summary,
|
||||||
int argc,
|
int argc,
|
||||||
const char ** argv,
|
const char * const * argv,
|
||||||
const tr_option * opts,
|
const tr_option * opts,
|
||||||
const char ** setme_optarg);
|
const char ** setme_optarg);
|
||||||
|
|
||||||
/** @brief prints the `Usage' help section to stdout */
|
/** @brief prints the `Usage' help section to stdout */
|
||||||
void tr_getopt_usage (const char * appName,
|
void tr_getopt_usage (const char * appName,
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ getUsage (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parseCommandLine (int argc, const char ** argv)
|
parseCommandLine (int argc, const char * const * argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
const char * optarg;
|
const char * optarg;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ getUsage (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parseCommandLine (int argc, const char ** argv)
|
parseCommandLine (int argc, const char * const * argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
const char * optarg;
|
const char * optarg;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ static bool showVersion = false;
|
|||||||
const char * filename = NULL;
|
const char * filename = NULL;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parseCommandLine (int argc, const char ** argv)
|
parseCommandLine (int argc, const char * const * argv)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
const char * optarg;
|
const char * optarg;
|
||||||
|
|||||||
Reference in New Issue
Block a user