mirror of
https://github.com/curl/curl.git
synced 2026-07-16 02:07:16 +03:00
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
This commit is contained in:
parent
ba1dbd78e5
commit
5bd8c389a3
6 changed files with 13 additions and 13 deletions
|
|
@ -52,11 +52,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<size; i += width) {
|
||||
|
||||
fprintf(stream, "%4.4lx: ", i);
|
||||
fprintf(stream, "%4.4lx: ", (unsigned long)i);
|
||||
|
||||
if(!nohex) {
|
||||
/* hex not disabled, show it */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue