Change #270310
| Category | None |
| Changed by | Viktor Szakats <commit@vsz.me> |
| Changed at | Wed 10 Jun 2026 15:14:08 |
| Repository | https://api.github.com/repos/curl/curl |
| Project | curl/curl |
| Branch | master |
| Revision | 2f3fa479dd1d2a59106136b8739f7b9e1f204b3e |
Comments
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 7c34365ccea19949317878c7fcd5f7376e2e09f1 #21879 Ref: #18343 (initial attempt) Closes #20848
Changed files
- CMake/PickyWarnings.cmake
- docs/examples/10-at-a-time.c
- docs/examples/externalsocket.c
- docs/examples/ftp-delete.c
- docs/examples/ftpget.c
- docs/examples/ftpgetinfo.c
- docs/examples/ftpsget.c
- docs/examples/log_failed_transfers.c
- docs/examples/multi-app.c
- docs/examples/multi-legacy.c
- docs/examples/sftpget.c
- docs/examples/sslbackend.c
- docs/examples/websocket-updown.c
- docs/examples/websocket.c
- lib/asyn-ares.c
- lib/asyn-thrdd.c
- lib/cf-dns.c
- lib/cf-h1-proxy.c
- lib/cf-h2-proxy.c
- lib/cf-https-connect.c
- lib/cf-ip-happy.c
- lib/cf-socket.c
- lib/cfilters.c
- lib/connect.c
- lib/content_encoding.c
- lib/curl_gssapi.c
- lib/curlx/strerr.c
- lib/cw-pause.c
- lib/doh.c
- lib/ftp.c
- lib/headers.c
- lib/hostip.c
- lib/http2.c
- lib/http_chunks.c
- lib/imap.c
- lib/mime.c
- lib/mqtt.c
- lib/multi.c
- lib/peer.c
- lib/pop3.c
- lib/request.c
- lib/rtsp.c
- lib/sendf.c
- lib/setopt.c
- lib/smtp.c
- lib/socks.c
- lib/strerror.c
- lib/tftp.c
- lib/transfer.c
- lib/url.c
- lib/vauth/digest.c
- lib/vauth/digest_sspi.c
- lib/vauth/ntlm_sspi.c
- lib/vquic/cf-ngtcp2-cmn.c
- lib/vquic/cf-ngtcp2-proxy.c
- lib/vquic/cf-ngtcp2.c
- lib/vquic/cf-quiche.c
- lib/vquic/vquic.c
- lib/vssh/libssh.c
- lib/vssh/libssh2.c
- lib/vtls/gtls.c
- lib/vtls/mbedtls.c
- lib/vtls/openssl.c
- lib/vtls/rustls.c
- lib/vtls/schannel.c
- lib/vtls/vtls.c
- lib/vtls/vtls_scache.c
- lib/vtls/vtls_spack.c
- lib/vtls/wolfssl.c
- lib/ws.c
- m4/curl-compilers.m4
- src/tool_main.c
- src/tool_operate.c
- src/tool_ssls.c
- src/tool_urlglob.c
- tests/libtest/cli_ftp_upload.c
- tests/libtest/cli_h2_pausing.c
- tests/libtest/cli_h2_upgrade_extreme.c
- tests/libtest/cli_hx_download.c
- tests/libtest/cli_hx_upload.c
- tests/libtest/cli_tls_session_reuse.c
- tests/libtest/cli_ws_data.c
- tests/libtest/cli_ws_pingpong.c
- tests/libtest/first.c
- tests/libtest/first.h
- tests/libtest/lib1156.c
- tests/libtest/lib1485.c
- tests/libtest/lib1509.c
- tests/libtest/lib1515.c
- tests/libtest/lib1518.c
- tests/libtest/lib1522.c
- tests/libtest/lib1523.c
- tests/libtest/lib1531.c
- tests/libtest/lib1532.c
- tests/libtest/lib1533.c
- tests/libtest/lib1534.c
- tests/libtest/lib1535.c
- tests/libtest/lib1536.c
- tests/libtest/lib1538.c
- tests/libtest/lib1541.c
- tests/libtest/lib1555.c
- tests/libtest/lib1556.c
- tests/libtest/lib1558.c
- tests/libtest/lib1559.c
- tests/libtest/lib1560.c
- tests/libtest/lib1565.c
- tests/libtest/lib1597.c
- tests/libtest/lib1906.c
- tests/libtest/lib1907.c
- tests/libtest/lib1911.c
- tests/libtest/lib1915.c
- tests/libtest/lib1916.c
- tests/libtest/lib1918.c
- tests/libtest/lib1922.c
- tests/libtest/lib1945.c
- tests/libtest/lib2032.c
- tests/libtest/lib2082.c
- tests/libtest/lib2301.c
- tests/libtest/lib2302.c
- tests/libtest/lib2304.c
- tests/libtest/lib2308.c
- tests/libtest/lib2309.c
- tests/libtest/lib2405.c
- tests/libtest/lib2700.c
- tests/libtest/lib3010.c
- tests/libtest/lib3026.c
- tests/libtest/lib3033.c
- tests/libtest/lib3034.c
- tests/libtest/lib3100.c
- tests/libtest/lib506.c
- tests/libtest/lib530.c
- tests/libtest/lib540.c
- tests/libtest/lib554.c
- tests/libtest/lib574.c
- tests/libtest/lib582.c
- tests/libtest/lib586.c
- tests/libtest/lib650.c
- tests/libtest/lib651.c
- tests/libtest/lib655.c
- tests/libtest/lib658.c
- tests/libtest/lib659.c
- tests/libtest/lib661.c
- tests/libtest/lib670.c
- tests/libtest/lib674.c
- tests/libtest/lib677.c
- tests/libtest/lib758.c
- tests/libtest/mk-lib1521.pl
- tests/server/dnsd.c
- tests/server/sws.c
- tests/tunit/tool1623.c
- tests/unit/unit1650.c
- tests/unit/unit1656.c
- tests/unit/unit1657.c
- tests/unit/unit1660.c
- tests/unit/unit1664.c
- tests/unit/unit1666.c
- tests/unit/unit1667.c
- tests/unit/unit1675.c
- tests/unit/unit2600.c
- tests/unit/unit2603.c
- tests/unit/unit2604.c
- tests/unit/unit2605.c