mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:23:31 +03:00
build: enable -Wformat-signedness, fix issues found
Adjust code to avoid `-Wformat-signedness` warnings, while making sure
that enums are always cast to a known type when passing them to `printf`
functions, to support compilers and compiler settings where enums are
not default-size signed ints.
- cast integers printed as hex to `unsigned`. (63 times, 20 of them in
`mbedtls.c`)
- cast misc enums to `int` for printing. (31 times)
- cast `CURL_LOCK_DATA_*` enums to `int`. (4 times)
- cast `CURL_FORMADD_*` enums to `int`. (13 times)
- cast `CURLSHE_*` enums to `int`. (3 times)
- cast `CURLUE_*` enums to `int`. (33 times)
- cast `CURLMSG_*` enums to `int`. (6 times)
- cast `CURLE_*` enums to `int`. (~380 times)
- unit1675: fix mask.
Follow-up to 7c34365cce #21879
Ref: #18343 (initial attempt)
Closes #20848
This commit is contained in:
parent
ae2986cdf0
commit
2f3fa479dd
162 changed files with 565 additions and 509 deletions
|
|
@ -94,7 +94,7 @@ retry:
|
|||
else {
|
||||
/* some other frame arrived. */
|
||||
fprintf(stderr, "ws: received frame of %u bytes rflags %x\n",
|
||||
(unsigned int)rlen, meta->flags);
|
||||
(unsigned int)rlen, (unsigned int)meta->flags);
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue