From 5bd8c389a3625e5c3eed265942d4c5b1e7e5d117 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Sun, 8 Jul 2018 16:44:32 +0200 Subject: 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 --- docs/examples/http2-upload.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/examples/http2-upload.c') 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