aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-08-08 12:03:34 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-08-08 11:24:43 +0100
commitea864fb24d0b703f9571bf6231e0e3e945747fc5 (patch)
tree4002ce975a0decca478bb50d8fcba686f9eb47cf /src
parent5908ce51159d16b72bd5772a18839630b9560d11 (diff)
tool_getparam.c: Fixed compilation warning
warning: `orig_opt' might be used uninitialized in this function
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index e8414e900..180878bab 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1811,7 +1811,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
{
int i;
bool stillflags;
- char *orig_opt;
+ char *orig_opt = NULL;
ParameterError result = PARAM_OK;
struct OperationConfig *operation = config->first;
@@ -1879,7 +1879,7 @@ ParameterError parse_args(struct GlobalConfig *config, int argc,
result != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(result);
- if(!curlx_strequal(":", orig_opt))
+ if(orig_opt && !curlx_strequal(":", orig_opt))
helpf(config->errors, "option %s: %s\n", orig_opt, reason);
else
helpf(config->errors, "%s\n", reason);