summaryrefslogtreecommitdiff
path: root/docs/examples/http2-upload.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-08 16:44:32 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2018-07-09 18:08:27 +0200
commit5bd8c389a3625e5c3eed265942d4c5b1e7e5d117 (patch)
tree83224097b09c5b12fe76ac9765fa97cf47339166 /docs/examples/http2-upload.c
parentba1dbd78e5f1ed67c1b8d37ac89d90e5e330b628 (diff)
downloadgnurl-5bd8c389a3625e5c3eed265942d4c5b1e7e5d117.tar.gz
gnurl-5bd8c389a3625e5c3eed265942d4c5b1e7e5d117.tar.bz2
gnurl-5bd8c389a3625e5c3eed265942d4c5b1e7e5d117.zip
examples: fix -Wformat warnings
When size_t is not a typedef for unsigned long (as usually the case on Windows), GCC emits -Wformat warnings when using lu and lx format specifiers with size_t. Silence them with explicit casts to unsigned long. Closes https://github.com/curl/curl/pull/2721
Diffstat (limited to 'docs/examples/http2-upload.c')
-rw-r--r--docs/examples/http2-upload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c
index 827d172ed..06ff04091 100644
--- a/docs/examples/http2-upload.c
+++ b/docs/examples/http2-upload.c
@@ -73,11 +73,11 @@ void dump(const char *text, int num, unsigned char *ptr, size_t size,
width = 0x40;
fprintf(stderr, "%d %s, %lu bytes (0x%lx)\n",
- num, text, size, size);
+ num, text, (unsigned long)size, (unsigned long)size);
for(i = 0; i<size; i += width) {
- fprintf(stderr, "%4.4lx: ", i);
+ fprintf(stderr, "%4.4lx: ", (unsigned long)i);
if(!nohex) {
/* hex not disabled, show it */