Skip to content

Commit

Permalink
parsedate.c: Fixed compilation warning
Browse files Browse the repository at this point in the history
parsedate.c:548: warning: 'parsed' may be used uninitialized in this
                 function

As curl_getdate() returns -1 when parsedate() fails we can initialise
parsed to -1.
  • Loading branch information
captain-caveman2k committed Dec 10, 2014
1 parent cd6c13c commit 664b9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parsedate.c
Expand Up @@ -545,7 +545,7 @@ static int parsedate(const char *date, time_t *output)

time_t curl_getdate(const char *p, const time_t *now)
{
time_t parsed;
time_t parsed = -1;
int rc = parsedate(p, &parsed);
(void)now; /* legacy argument from the past that we ignore */

Expand Down

0 comments on commit 664b9ba

Please sign in to comment.