diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-12-10 11:38:38 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-12-10 11:38:38 +0000 |
commit | 664b9baf67c2c22ebaf3606298ca9c4ce0b382d2 (patch) | |
tree | b089e9eaa0eaa1b5b44bfe9b6170c973e9d9cb0b | |
parent | cd6c13c2b3ecfe36760074fb968a4d4d8a513e12 (diff) |
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.
-rw-r--r-- | lib/parsedate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/parsedate.c b/lib/parsedate.c index ecb8dfb42..3e168f5ab 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -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 */ |