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/debug.c | 4 ++-- docs/examples/getinmemory.c | 2 +- docs/examples/http2-download.c | 4 ++-- docs/examples/http2-serverpush.c | 8 ++++---- docs/examples/http2-upload.c | 4 ++-- docs/examples/multi-debugcallback.c | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) (limited to 'docs/examples') diff --git a/docs/examples/debug.c b/docs/examples/debug.c index 48a3fd5d0..79250146d 100644 --- a/docs/examples/debug.c +++ b/docs/examples/debug.c @@ -45,11 +45,11 @@ void dump(const char *text, width = 0x40; fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n", - text, size, size); + text, (unsigned long)size, (unsigned long)size); for(i = 0; i