#
ce7d0d41 |
| 08-Sep-2024 |
Viktor Szakats |
ipfs: add options to disable - CPPFLAGS: `-DCURL_DISABLE_IPFS` - configure: `--disable-ipfs` - cmake: `-DCURL_DISABLE_IPFS=ON` Fixes #14824 Closes #14827
|
#
c0450488 |
| 21-Aug-2024 |
Viktor Szakats |
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch w
src: fix potential macro confusion in cmake unity builds Sources used `lib/curlx.h` with both `ENABLE_CURLX_PRINTF` set and unset before including it. In a cmake "unity" batch where the first included source had it unset, the next sources did not get the macros requested with `ENABLE_CURLX_PRINTF` because `lib/curl.x` had already been included without them. Fix it by by making the macros enabled permanently and globally for internal sources, and dropping `ENABLE_CURLX_PRINTF`. This came up while testing unity builds with smaller batches. The full, default unity build where all `src` is bundled up in a single unit, was not affected. Fixes: ``` $ cmake -B build -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_BATCH_SIZE=15 $ make -C build ... curl/src/tool_getparam.c: In function ‘getparameter’: curl/src/tool_getparam.c:2409:11: error: implicit declaration of function ‘msnprintf’; did you mean ‘vsnprintf’? [-Wimplicit-function-declaration] 2409 | msnprintf(buffer, sizeof(buffer), "%" CURL_FORMAT_CURL_OFF_T "-", | ^~~~~~~~~ | vsnprintf curl/src/tool_getparam.c:2409:11: warning: nested extern declaration of ‘msnprintf’ [-Wnested-externs] [...] ``` Reported-by: Daniel Stenberg Bug: https://github.com/curl/curl/pull/14626#issuecomment-2301663491 Closes #14632
show more ...
|
#
c074ba64 |
| 01-Jul-2024 |
Daniel Stenberg |
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname
code: language cleanup in comments Based on the standards and guidelines we use for our documentation. - expand contractions (they're => they are etc) - host name = > hostname - file name => filename - user name = username - man page => manpage - run-time => runtime - set-up => setup - back-end => backend - a HTTP => an HTTP - Two spaces after a period => one space after period Closes #14073
show more ...
|
#
aba80430 |
| 30-Mar-2024 |
Daniel Stenberg |
tool: follow-up getenv fix Remove a double free. Change the IPFS env use to a plain getenv() simply because coverity gets confused. Follow-up to 9126b141c9398fe Closes #13241
|
#
9126b141 |
| 30-Mar-2024 |
Daniel Stenberg |
curl: use curl_getenv instead of the curlx_ version The curlx one was once introduced when we still considered dropping the libcurl function at some point. To reduce confusion and to mak
curl: use curl_getenv instead of the curlx_ version The curlx one was once introduced when we still considered dropping the libcurl function at some point. To reduce confusion and to make it easier to understand when curl_free() should be used, use the actual libcurl function call directly instead. Closes #13230
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 ...
|
#
d0664381 |
| 11-Nov-2023 |
Mark Gaiser |
IPFS: bugfixes - Fixed endianness bug in gateway file parsing - Use IPFS_PATH in tests where IPFS_DATA was used - Fixed typos from traling -> trailing - Fixed broken link in IPFS
IPFS: bugfixes - Fixed endianness bug in gateway file parsing - Use IPFS_PATH in tests where IPFS_DATA was used - Fixed typos from traling -> trailing - Fixed broken link in IPFS.md Follow-up to 859e88f6533f9e Reported-by: Michael Kaufmann Bug: https://github.com/curl/curl/pull/12152#issuecomment-1798214137 Closes #12305
show more ...
|
#
01d9b8bc |
| 06-Nov-2023 |
Daniel Stenberg |
curl: move IPFS code into src/tool_ipfs.[ch] - convert ensure_trailing into ensure_trailing_slash - strdup the URL string to own it proper - use shorter variable names - combine
curl: move IPFS code into src/tool_ipfs.[ch] - convert ensure_trailing into ensure_trailing_slash - strdup the URL string to own it proper - use shorter variable names - combine some expressions - simplify error handling in ipfs_gateway() - add MAX_GATEWAY_URL_LEN + proper bailout if maximum is reached - ipfs-gateway.d polish and simplification - shorten ipfs error message + make them "synthetic" Closes #12281
show more ...
|