summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-01-12 23:06:15 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-01-13 10:39:23 +0100
commite6b72644c2058117a1c32541b57cbf3898399f12 (patch)
tree7af66e4d5696a064426cf1e2b7ce496bb31e9cca /src
parent12157aa924516cb1203a82d75eaa69ed2d2442f6 (diff)
downloadcurl-e6b72644c2058117a1c32541b57cbf3898399f12.tar.gz
tool_getparam: fix compiler warning when !HAVE_WRITABLE_ARGV
Follow-up to 2ed0e1f70ee176edf3d2 Closes #10286
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index cecaf4b8d..68258e9d1 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -689,10 +689,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
ParameterError err;
bool toggle = TRUE; /* how to switch boolean options, on or off. Controlled
by using --OPTION or --no-OPTION */
-#ifdef HAVE_WRITABLE_ARGV
- argv_item_t clearthis = NULL;
-#endif
-
static const char *redir_protos[] = {
"http",
"https",
@@ -700,6 +696,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
"ftps",
NULL
};
+#ifdef HAVE_WRITABLE_ARGV
+ argv_item_t clearthis = NULL;
+#else
+ (void)cleararg;
+#endif
*usedarg = FALSE; /* default is that we don't use the arg */