summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-04 18:59:05 +0000
committerYang Tse <yangsita@gmail.com>2008-09-04 18:59:05 +0000
commit3dcd2b82c4095e34342c8d0778d45d547c23b06d (patch)
treeda4bf9cc899604f034776bff1268e579640a70e6 /lib
parentc0f3e324479c6c0e66f0f45c43429041f5c5d34d (diff)
downloadcurl-3dcd2b82c4095e34342c8d0778d45d547c23b06d.tar.gz
fix print formatting string directives
Diffstat (limited to 'lib')
-rw-r--r--lib/base64.c2
-rw-r--r--lib/http_digest.c2
-rw-r--r--lib/memdebug.c8
-rw-r--r--lib/nss.c4
-rw-r--r--lib/strerror.c4
-rw-r--r--lib/url.c6
6 files changed, 13 insertions, 13 deletions
diff --git a/lib/base64.c b/lib/base64.c
index da9d01a93..9dbf9f4ea 100644
--- a/lib/base64.c
+++ b/lib/base64.c
@@ -271,7 +271,7 @@ int main(int argc, argv_item_t argv[], char **envp)
data = (unsigned char *)suck(&dataLen);
base64Len = Curl_base64_encode(handle, data, dataLen, &base64);
- fprintf(stderr, "%d\n", base64Len);
+ fprintf(stderr, "%zu\n", base64Len);
fprintf(stdout, "%s\n", base64);
free(base64); free(data);
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 92d44ada7..ddeb93747 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -293,7 +293,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
if(!d->cnonce) {
/* Generate a cnonce */
now = Curl_tvnow();
- snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", now.tv_sec);
+ snprintf(cnoncebuf, sizeof(cnoncebuf), "%06ld", (long)now.tv_sec);
if(Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), &cnonce))
d->cnonce = cnonce;
else
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 7742d5e1c..98117130d 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -167,7 +167,7 @@ void *curl_docalloc(size_t wanted_elements, size_t wanted_size,
}
if(logfile && source)
- fprintf(logfile, "MEM %s:%d calloc(%u,%u) = %p\n",
+ fprintf(logfile, "MEM %s:%d calloc(%zu,%zu) = %p\n",
source, line, wanted_elements, wanted_size, mem ? mem->mem : 0);
return (mem ? mem->mem : NULL);
}
@@ -189,7 +189,7 @@ char *curl_dostrdup(const char *str, int line, const char *source)
memcpy(mem, str, len);
if(logfile)
- fprintf(logfile, "MEM %s:%d strdup(%p) (%zd) = %p\n",
+ fprintf(logfile, "MEM %s:%d strdup(%p) (%zu) = %p\n",
source, line, str, len, mem);
return mem;
@@ -212,7 +212,7 @@ void *curl_dorealloc(void *ptr, size_t wantedsize,
mem=(struct memdebug *)(Curl_crealloc)(mem, size);
if(logfile)
- fprintf(logfile, "MEM %s:%d realloc(%p, %zd) = %p\n",
+ fprintf(logfile, "MEM %s:%d realloc(%p, %zu) = %p\n",
source, line, ptr, wantedsize, mem?mem->mem:NULL);
if(mem) {
diff --git a/lib/nss.c b/lib/nss.c
index b6ed59c8b..c82bbfac7 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -1096,7 +1096,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
n = strrchr(data->set.str[STRING_CERT], '/');
if(n) {
n++; /* skip last slash */
- snprintf(nickname, PATH_MAX, "PEM Token #%ld:%s", 1, n);
+ snprintf(nickname, PATH_MAX, "PEM Token #%d:%s", 1, n);
}
}
else {
@@ -1164,7 +1164,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
n = strrchr(data->set.str[STRING_SSL_ISSUERCERT], '/');
if (n) {
n++; /* skip last slash */
- snprintf(nickname, PATH_MAX, "PEM Token #%ld:%s", 1, n);
+ snprintf(nickname, PATH_MAX, "PEM Token #%d:%s", 1, n);
}
}
else {
diff --git a/lib/strerror.c b/lib/strerror.c
index 032e2c747..f1d22e143 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2004 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2004 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -720,7 +720,7 @@ const char *Curl_idn_strerror (struct connectdata *conn, int err)
str = "dlopen() error";
break;
default:
- snprintf(buf, max, "error %d", (int)err);
+ snprintf(buf, max, "error %d", err);
str = NULL;
break;
}
diff --git a/lib/url.c b/lib/url.c
index 57ffffe53..b000fe2e3 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -411,7 +411,7 @@ CURLcode Curl_close(struct SessionHandle *data)
if(data == (struct SessionHandle *) curr->ptr) {
fprintf(stderr,
"MAJOR problem we %p are still in send pipe for %p done %d\n",
- data, connptr, connptr->bits.done);
+ data, connptr, (int)connptr->bits.done);
}
}
}
@@ -421,7 +421,7 @@ CURLcode Curl_close(struct SessionHandle *data)
if(data == (struct SessionHandle *) curr->ptr) {
fprintf(stderr,
"MAJOR problem we %p are still in recv pipe for %p done %d\n",
- data, connptr, connptr->bits.done);
+ data, connptr, (int)connptr->bits.done);
}
}
}
@@ -431,7 +431,7 @@ CURLcode Curl_close(struct SessionHandle *data)
if(data == (struct SessionHandle *) curr->ptr) {
fprintf(stderr,
"MAJOR problem we %p are still in pend pipe for %p done %d\n",
- data, connptr, connptr->bits.done);
+ data, connptr, (int)connptr->bits.done);
}
}
}