summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMarcel Raad <raad@teamviewer.com>2016-12-21 11:05:13 +0100
committerMarcel Raad <raad@teamviewer.com>2016-12-21 11:07:26 +0100
commit773cef4faeec7a9c76123aca861525dca7dfb6bf (patch)
treee4932a56a2ee4a05eb3e22df30316e4a82b2551e /lib
parent95c717bbd9c327c38b4efcc37d5cda29b8ee2a36 (diff)
downloadcurl-773cef4faeec7a9c76123aca861525dca7dfb6bf.tar.gz
lib: fix MSVC compiler warnings
Visual C++ complained: warning C4267: '=': conversion from 'size_t' to 'long', possible loss of data warning C4701: potentially uninitialized local variable 'path' used
Diffstat (limited to 'lib')
-rw-r--r--lib/http_digest.c2
-rw-r--r--lib/mprintf.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 0ed02493d..e2d865b0a 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -74,7 +74,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
{
CURLcode result;
struct Curl_easy *data = conn->data;
- unsigned char *path;
+ unsigned char *path = NULL;
char *tmp = NULL;
char *response;
size_t len;
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 0dea5af62..e4270abe8 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -935,7 +935,7 @@ static int dprintf_formatf(
}
if(prec > (long)maxprec)
- prec = maxprec-1;
+ prec = (long)maxprec-1;
/* RECURSIVE USAGE */
len = curl_msnprintf(fptr, left, ".%ld", prec);
fptr += len;