From 664b9baf67c2c22ebaf3606298ca9c4ce0b382d2 Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Wed, 10 Dec 2014 11:38:38 +0000 Subject: [PATCH] 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. --- lib/parsedate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */