mirror of https://github.com/moparisthebest/curl
lib: fix compiler warnings
Fix the following warnings when building the tests by using the correct types: cast from 'const char *' to 'void *' drops const qualifier [-Wcast-qual] implicit conversion changes signedness [-Wsign-conversion]
This commit is contained in:
parent
fa12f54bba
commit
cee39aa3be
|
@ -236,7 +236,7 @@ char *curl_dostrdup(const char *str, int line, const char *source)
|
||||||
|
|
||||||
if(source)
|
if(source)
|
||||||
curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n",
|
curl_memlog("MEM %s:%d strdup(%p) (%zu) = %p\n",
|
||||||
source, line, (void *)str, len, (void *)mem);
|
source, line, (const void *)str, len, (const void *)mem);
|
||||||
|
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
@ -480,7 +480,7 @@ void curl_memlog(const char *format, ...)
|
||||||
nchars = LOGLINE_BUFSIZE - 1;
|
nchars = LOGLINE_BUFSIZE - 1;
|
||||||
|
|
||||||
if(nchars > 0)
|
if(nchars > 0)
|
||||||
fwrite(buf, 1, nchars, logfile);
|
fwrite(buf, 1, (size_t)nchars, logfile);
|
||||||
|
|
||||||
(Curl_cfree)(buf);
|
(Curl_cfree)(buf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -610,7 +610,7 @@ static int dprintf_formatf(
|
||||||
int is_neg;
|
int is_neg;
|
||||||
|
|
||||||
/* Base of a number to be written. */
|
/* Base of a number to be written. */
|
||||||
long base;
|
unsigned long base;
|
||||||
|
|
||||||
/* Integral values to be written. */
|
/* Integral values to be written. */
|
||||||
mp_uintmax_t num;
|
mp_uintmax_t num;
|
||||||
|
|
Loading…
Reference in New Issue