1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 15:48:49 -05:00

parsedate.c: Fixed compilation warning

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.
This commit is contained in:
Steve Holme 2014-12-10 11:38:38 +00:00
parent cd6c13c2b3
commit 664b9baf67

View File

@ -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 */