Skip to content

Commit

Permalink
tool_getparam.c: Fixed compilation warning
Browse files Browse the repository at this point in the history
warning: `orig_opt' might be used uninitialized in this function
  • Loading branch information
captain-caveman2k committed Aug 8, 2014
1 parent 5908ce5 commit ea864fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tool_getparam.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ea864fb

Please sign in to comment.