#
c730c854 |
| 21-Aug-2024 |
Viktor Szakats |
build: make `CURL_FORMAT_CURL_OFF_T[U]` work with mingw-w64 <=7.0.0 Add tweak for mingw-w64 when building tests/http/client programs to avoid a bogus `-Wformat` warning when using mingw-
build: make `CURL_FORMAT_CURL_OFF_T[U]` work with mingw-w64 <=7.0.0 Add tweak for mingw-w64 when building tests/http/client programs to avoid a bogus `-Wformat` warning when using mingw-w64 v7.0.0 or older. The warning is bogus because these programs use curl's `printf()` implementation that is guaranteed to support that format spec. Add this for both CMake and autotools. (But only CMake is CI tested with an old toolchain.) Apply the workaround to `docs/examples`, and fix an example to use curl's `printf()` with `CURL_FORMAT_CURL_OFF_T`. Reintroduce curl `printf()` calls into `tests/http/client`, via #14625. Also restore large number masks to a printf, changed earlier in #14382. Follow-up to 232302f88a152a1d1722da9f69c383a766528918 #14382 Ref: https://github.com/curl/curl/pull/14625#issuecomment-2302361737 Closes #14640
show more ...
|
#
232302f8 |
| 04-Aug-2024 |
Viktor Szakats |
cmake: add Linux CI job, fix pytest with cmake - extend existing Linux workflow with CMake support. Including running pytest the first time with CMake. - cmake: generate `test
cmake: add Linux CI job, fix pytest with cmake - extend existing Linux workflow with CMake support. Including running pytest the first time with CMake. - cmake: generate `tests/config` and `tests/http/config.ini`. Required for pytest tests. Uses basic detection logic. Feel free to take it from here. Also dump config files in a CI step for debugging purposes. - cmake: build `tests/http/clients` programs. - fix portability issues with `tests/http/clients` programs. Some of them use `getopt()`, which is not supported by MSVC. Fix the rest to compile in CI (old-mingw-w64, MSVC, Windows). - GHA/linux: add CMake job matching an existing autotools one. - GHA/linux: test `-DCURL_LIBCURL_VERSIONED_SYMBOLS=ON` in the new CMake job. - reorder testdeps to build server, client tests first and then libtests and units, to catch errors in the more complex/unique sources earlier. - sort list in `tests/http/clients/Makefile.inc`. Closes #14382
show more ...
|
#
f81f351b |
| 02-Aug-2024 |
Viktor Szakats |
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux,
tidy-up: OS names Use these words and casing more consistently across text, comments and one curl tool output: AIX, ALPN, ANSI, BSD, Cygwin, Darwin, FreeBSD, GitHub, HP-UX, Linux, macOS, MS-DOS, MSYS, MinGW, NTLM, POSIX, Solaris, UNIX, Unix, Unicode, WINE, WebDAV, Win32, winbind, WinIDN, Windows, Windows CE, Winsock. Mostly OS names and a few more. Also a couple of other minor text fixups. Closes #14360
show more ...
|
#
3829759b |
| 08-Dec-2023 |
Viktor Szakats |
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]
build: enable missing OpenSSF-recommended warnings, with fixes https://best.openssf.org/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.html as of 2023-11-29 [1]. Enable new recommended warnings (except `-Wsign-conversion`): - enable `-Wformat=2` for clang (in both cmake and autotools). - add `CURL_PRINTF()` internal attribute and mark functions accepting printf arguments with it. This is a copy of existing `CURL_TEMP_PRINTF()` but using `__printf__` to make it compatible with redefinting the `printf` symbol: https://gcc.gnu.org/onlinedocs/gcc-3.0.4/gcc_5.html#SEC94 - fix `CURL_PRINTF()` and existing `CURL_TEMP_PRINTF()` for mingw-w64 and enable it on this platform. - enable `-Wimplicit-fallthrough`. - enable `-Wtrampolines`. - add `-Wsign-conversion` commented with a FIXME. - cmake: enable `-pedantic-errors` the way we do it with autotools. Follow-up to d5c0351055d5709da8f3e16c91348092fdb481aa #2747 - lib/curl_trc.h: use `CURL_FORMAT()`, this also fixes it to enable format checks. Previously it was always disabled due to the internal `printf` macro. Fix them: - fix bug where an `set_ipv6_v6only()` call was missed in builds with `--disable-verbose` / `CURL_DISABLE_VERBOSE_STRINGS=ON`. - add internal `FALLTHROUGH()` macro. - replace obsolete fall-through comments with `FALLTHROUGH()`. - fix fallthrough markups: Delete redundant ones (showing up as warnings in most cases). Add missing ones. Fix indentation. - silence `-Wformat-nonliteral` warnings with llvm/clang. - fix one `-Wformat-nonliteral` warning. - fix new `-Wformat` and `-Wformat-security` warnings. - fix `CURL_FORMAT_SOCKET_T` value for mingw-w64. Also move its definition to `lib/curl_setup.h` allowing use in `tests/server`. - lib: fix two wrongly passed string arguments in log outputs. Co-authored-by: Jay Satiro - fix new `-Wformat` warnings on mingw-w64. [1] https://github.com/ossf/wg-best-practices-os-developers/blob/56c0fde3895bfc55c8a973ef49a2572c507b2ae1/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C%2B%2B.md Closes #12489
show more ...
|