diff --git a/lib/strtoofft.c b/lib/strtoofft.c index 4a1d6438931787..580fd23bf1ea33 100644 --- a/lib/strtoofft.c +++ b/lib/strtoofft.c @@ -212,7 +212,7 @@ static int get_char(char c, int base) CURLofft curlx_strtoofft(const char *str, char **endp, int base, curl_off_t *num) { - char *end; + char *end = NULL; curl_off_t number; errno = 0; *num = 0; /* clear by default */ diff --git a/lib/urlapi.c b/lib/urlapi.c index 3cd0362c51d210..dc42489722bc2c 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -531,7 +531,7 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host, portptr = strchr(hostname, ':'); if(portptr) { - char *rest; + char *rest = NULL; long port; size_t keep = portptr - hostname; @@ -681,7 +681,7 @@ static int ipv4_normalize(struct dynbuf *host) return HOST_IPV6; while(!done) { - char *endp; + char *endp = NULL; unsigned long l; if(!ISDIGIT(*c)) /* most importantly this doesn't allow a leading plus or minus */