From: Marcel Raad Date: Sun, 8 Jul 2018 14:44:32 +0000 (+0200) Subject: examples: fix -Wformat warnings X-Git-Tag: curl-7_61_0~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bd8c389a3625e5c3eed265942d4c5b1e7e5d117;p=thirdparty%2Fcurl.git 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 --- diff --git a/docs/examples/debug.c b/docs/examples/debug.c index 48a3fd5d0d..79250146df 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