[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 169/178: examples: Fix format specifiers
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 169/178: examples: Fix format specifiers |
Date: |
Wed, 23 May 2018 12:26:44 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 13505dcb5573e256fd14daf97afefb8b9a7c6263
Author: Rikard Falkeborn <address@hidden>
AuthorDate: Sun May 6 19:44:03 2018 +0200
examples: Fix format specifiers
Closes #2561
---
docs/examples/debug.c | 6 +++---
docs/examples/getinmemory.c | 2 +-
docs/examples/http2-download.c | 6 +++---
docs/examples/http2-serverpush.c | 12 ++++++------
docs/examples/http2-upload.c | 6 +++---
docs/examples/multi-debugcallback.c | 6 +++---
docs/examples/sessioninfo.c | 2 +-
7 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/docs/examples/debug.c b/docs/examples/debug.c
index 554eb3ec6..48a3fd5d0 100644
--- a/docs/examples/debug.c
+++ b/docs/examples/debug.c
@@ -44,12 +44,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
- text, (long)size, (long)size);
+ fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+ text, size, size);
for(i = 0; i<size; i += width) {
- fprintf(stream, "%4.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/docs/examples/getinmemory.c b/docs/examples/getinmemory.c
index fb7947838..776bbd21a 100644
--- a/docs/examples/getinmemory.c
+++ b/docs/examples/getinmemory.c
@@ -100,7 +100,7 @@ int main(void)
* Do something nice with it!
*/
- printf("%lu bytes retrieved\n", (long)chunk.size);
+ printf("%lu bytes retrieved\n", chunk.size);
}
/* cleanup curl stuff */
diff --git a/docs/examples/http2-download.c b/docs/examples/http2-download.c
index 8515663f1..cc9ff2b58 100644
--- a/docs/examples/http2-download.c
+++ b/docs/examples/http2-download.c
@@ -71,12 +71,12 @@ void dump(const char *text, int num, unsigned char *ptr,
size_t size,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
- num, text, (long)size, (long)size);
+ fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
+ num, text, size, size);
for(i = 0; i<size; i += width) {
- fprintf(stderr, "%4.4lx: ", (long)i);
+ fprintf(stderr, "%4.4lx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c
index 0162a8f8a..94c8db975 100644
--- a/docs/examples/http2-serverpush.c
+++ b/docs/examples/http2-serverpush.c
@@ -51,12 +51,12 @@ void dump(const char *text, unsigned char *ptr, size_t size,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stderr, "%s, %ld bytes (0x%lx)\n",
- text, (long)size, (long)size);
+ fprintf(stderr, "%s, %lu bytes (0x%lx)\n",
+ text, size, size);
for(i = 0; i<size; i += width) {
- fprintf(stderr, "%4.4lx: ", (long)i);
+ fprintf(stderr, "%4.4lx: ", i);
if(!nohex) {
/* hex not disabled, show it */
@@ -180,12 +180,12 @@ static int server_push_callback(CURL *parent,
/* write to this file */
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
- fprintf(stderr, "**** push callback approves stream %u, got %d headers!\n",
- count, (int)num_headers);
+ fprintf(stderr, "**** push callback approves stream %u, got %lu headers!\n",
+ count, num_headers);
for(i = 0; i<num_headers; i++) {
headp = curl_pushheader_bynum(headers, i);
- fprintf(stderr, "**** header %u: %s\n", (int)i, headp);
+ fprintf(stderr, "**** header %lu: %s\n", i, headp);
}
headp = curl_pushheader_byname(headers, ":path");
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
index 2a08b89db..827d172ed 100644
--- a/docs/examples/http2-upload.c
+++ b/docs/examples/http2-upload.c
@@ -72,12 +72,12 @@ void dump(const char *text, int num, unsigned char *ptr,
size_t size,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stderr, "%d %s, %ld bytes (0x%lx)\n",
- num, text, (long)size, (long)size);
+ fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
+ num, text, size, size);
for(i = 0; i<size; i += width) {
- fprintf(stderr, "%4.4lx: ", (long)i);
+ fprintf(stderr, "%4.4lx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/docs/examples/multi-debugcallback.c
b/docs/examples/multi-debugcallback.c
index abb0de685..5de3ff3e5 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -51,12 +51,12 @@ void dump(const char *text,
/* without the hex output, we can fit more on screen */
width = 0x40;
- fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
- text, (long)size, (long)size);
+ fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+ text, size, size);
for(i = 0; i<size; i += width) {
- fprintf(stream, "%4.4lx: ", (long)i);
+ fprintf(stream, "%4.4lx: ", i);
if(!nohex) {
/* hex not disabled, show it */
diff --git a/docs/examples/sessioninfo.c b/docs/examples/sessioninfo.c
index 024a0e12d..86a813a04 100644
--- a/docs/examples/sessioninfo.c
+++ b/docs/examples/sessioninfo.c
@@ -63,7 +63,7 @@ static size_t wrfu(void *ptr, size_t size, size_t nmemb, void
*stream)
gnutls_x509_crt_import(cert, &chainp[i], GNUTLS_X509_FMT_DER)) {
if(GNUTLS_E_SUCCESS ==
gnutls_x509_crt_print(cert, GNUTLS_CRT_PRINT_FULL, &dn)) {
- fprintf(stderr, "Certificate #%d: %.*s", i, dn.size, dn.data);
+ fprintf(stderr, "Certificate #%u: %.*s", i, dn.size, dn.data);
gnutls_free(dn.data);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 170/178: CODE_STYLE: mention return w/o parens, but sizeof with, (continued)
- [GNUnet-SVN] [gnurl] 170/178: CODE_STYLE: mention return w/o parens, but sizeof with, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 168/178: tool: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 175/178: docs/libcurl/index.html: removed, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 164/178: contributors.sh: use "on github", not at, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 163/178: http2: getsock fix for uploads, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 162/178: pingpong: fix response cache memcpy overflow, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 172/178: gcc: disable picky gcc-8 function pointer warnings in two places, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 173/178: http2: use easy handle of stream for logging, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 135/178: CURLOPT_URL.3: add ENCODING section [ci skip], gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 165/178: lib: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 169/178: examples: Fix format specifiers,
gnunet <=
- [GNUnet-SVN] [gnurl] 158/178: setup_transfer: deal with both sockets being -1, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 178/178: Merge tag 'curl-7_60_0' (with fixes), gnunet, 2018/05/23