summaryrefslogtreecommitdiff
path: root/lib/memdebug.c
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2017-05-02 20:47:13 +0200
committerMarcel Raad <raad@teamviewer.com>2017-05-03 20:11:13 +0200
commitcee39aa3beb2da995104a2c57fe9a24be6b9f6c0 (patch)
tree98eaed76e0b4f9d7c65c92919947db91f3790878 /lib/memdebug.c
parentfa12f54bba39bf5795826e04c9f0fa1a4e052157 (diff)
downloadcurl-cee39aa3beb2da995104a2c57fe9a24be6b9f6c0.tar.gz
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]
Diffstat (limited to 'lib/memdebug.c')
-rw-r--r--lib/memdebug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 32d2adfb5..516f273c1 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -236,7 +236,7 @@ char *curl_dostrdup(const char *str, int line, const char *source)
if(source)
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;
}
@@ -480,7 +480,7 @@ void curl_memlog(const char *format, ...)
nchars = LOGLINE_BUFSIZE - 1;
if(nchars > 0)
- fwrite(buf, 1, nchars, logfile);
+ fwrite(buf, 1, (size_t)nchars, logfile);
(Curl_cfree)(buf);
}