#
573e7e82 |
| 23-Aug-2024 |
Viktor Szakats |
lib, src: delete stray `curl_` prefix from printf calls Also: - unit1398: delete redundant `curl/mprintf.h` include. Closes #14664
|
#
118f446a |
| 22-Aug-2024 |
Viktor Szakats |
src: delete `curlx_m*printf()` aliases A couple of seemingly random calls used them. They were all mapped to `curl_m*printf()`. Closes #14647
|
#
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 ...
|
#
6946b3a7 |
| 28-May-2024 |
Daniel Stenberg |
curl: make warnings and other messages aware of terminal width This removes unnecessary line wraps when the terminal is wider than 79 columns and it also makes messages look better in na
curl: make warnings and other messages aware of terminal width This removes unnecessary line wraps when the terminal is wider than 79 columns and it also makes messages look better in narrower terminals. The get_terminal_columns() function is not split out into its own source file. Suggested-by: Elliott Balsley Fixes #13804 Closes #13808
show more ...
|
#
cb343182 |
| 28-Jan-2024 |
Viktor Szakats |
build: delete/replace 3 more clang warning pragmas - tool_msgs: delete redundant `-Wformat-nonliteral` suppression pragma. - whitespace formatting in `mprintf.h`, lib518, lib537.
build: delete/replace 3 more clang warning pragmas - tool_msgs: delete redundant `-Wformat-nonliteral` suppression pragma. - whitespace formatting in `mprintf.h`, lib518, lib537. - lib518: fix wrong variable in `sizeof()`. - lib518: bump variables to `rlim_t`. Follow-up to e2b394106d543c4615a60795b7fdce04bd4e5090 #1469 - lib518: sync error message with lib537 Follow-up to 365322b8bcf9efb6a361473d227b70f2032212ce - lib518, lib537: replace `-Wformat-nonliteral` suppression pragmas by reworking test code. Follow-up to 5b286c250829e06a135a6ba998e80beb7f43a734 #12812 Follow-up to aee4ebe59161d0a5281743f96e7738ad97fe1cd4 #12803 Follow-up to 09230127589eccc7e01c1a7217787ef8e64f3328 #12540 Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489 Reviewed-by: Daniel Stenberg Closes #12814
show more ...
|
#
5b286c25 |
| 27-Jan-2024 |
Viktor Szakats |
build: delete/replace clang warning pragmas - delete redundant warning suppressions for `-Wformat-nonliteral`. This now relies on `CURL_PRINTF()` and it's theoratically possible
build: delete/replace clang warning pragmas - delete redundant warning suppressions for `-Wformat-nonliteral`. This now relies on `CURL_PRINTF()` and it's theoratically possible that this macro isn't active but the warning is. We're ignoring this as a corner-case here. - replace two pragmas with code changes to avoid the warnings. Follow-up to aee4ebe59161d0a5281743f96e7738ad97fe1cd4 #12803 Follow-up to 09230127589eccc7e01c1a7217787ef8e64f3328 #12540 Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489 Reviewed-by: Daniel Stenberg Closes #12812
show more ...
|
#
09230127 |
| 16-Dec-2023 |
Viktor Szakats |
build: more `-Wformat` fixes - memdebug: update to not trigger `-Wformat-nonliteral` warnings. - imap: mark `imap_sendf()` with `CURL_PRINTF()`. - tool_msgs: mark static function wi
build: more `-Wformat` fixes - memdebug: update to not trigger `-Wformat-nonliteral` warnings. - imap: mark `imap_sendf()` with `CURL_PRINTF()`. - tool_msgs: mark static function with `CURL_PRINTF()`. Follow-up to 3829759bd042c03225ae862062560f568ba1a231 #12489 Closes #12540
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 ...
|
#
e5bb88b8 |
| 28-Sep-2023 |
Viktor Szakats |
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the
tool: use our own stderr variable Earlier this year we changed our own stderr variable to use the standard name `stderr` (to avoid bugs where someone is using `stderr` instead of the curl-tool specific variable). This solution needed to override the standard `stderr` symbol via the preprocessor. This in turn didn't play well with unity builds and caused curl tool to crash or stay silent due to an uninitialized stderr. This was a hard to find issue, fixed by manually breaking out one file from the unity sources. To avoid two these two tricks, this patch implements a different solution: Restore using our own local variable for our stderr output and leave `stderr` as-is. To avoid using `stderr` by mistake, add a `checksrc` rule (based on logic we already used in lib for `strerror`) that detects any `stderr` use in `src` and points to using our own variable instead: `tool_stderr`. Follow-up to 06133d3e9b8aeb9e9ca0b3370c246bdfbfc8619e Follow-up to 2f17a9b654121dd1ecf4fc043c6d08a9da3522db Closes #11958
show more ...
|
#
741f7ed4 |
| 31-May-2023 |
Daniel Stenberg |
tool: use errorf() for error output Convert a number of fprintf() calls.
|
#
6d45b9ca |
| 30-May-2023 |
Daniel Stenberg |
tool: remove newlines from all helpf/notef/warnf/errorf calls Make voutf() always add one. Closes #11226
|
#
2f17a9b6 |
| 04-Mar-2023 |
Jay Satiro |
tool: improve --stderr handling - freopen stderr with the user-specified file (--stderr file) instead of using a separate 'errors' stream. - In tool_setup.h override stdio.h's
tool: improve --stderr handling - freopen stderr with the user-specified file (--stderr file) instead of using a separate 'errors' stream. - In tool_setup.h override stdio.h's stderr macro as global variable tool_stderr. Both freopen and overriding the stderr macro are necessary because if the user-specified filename is "-" then stdout is assigned to tool_stderr and no freopen takes place. See the PR for more information. Ref: https://github.com/curl/curl/issues/10491 Closes https://github.com/curl/curl/pull/10673
show more ...
|
#
6841f2ed |
| 16-Feb-2023 |
Daniel Stenberg |
curl: make --silent work stand-alone - renamed the struct field to 'silent' to match the cmdline option - make --show-error toggle independently of --silent - make --silent independe
curl: make --silent work stand-alone - renamed the struct field to 'silent' to match the cmdline option - make --show-error toggle independently of --silent - make --silent independent of ->noprogress as well By doing this, the three options --silent, --no-progress-meter and --show-error should work independently of each other and also work with and without '--no-' prefix as documented. Reported-by: u20221022 on github Fixes #10535 Closes #10536
show more ...
|
#
2bc1d775 |
| 02-Jan-2023 |
Daniel Stenberg |
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - save
copyright: update all copyright lines and remove year ranges - they are mostly pointless in all major jurisdictions - many big corporations and projects already don't use them - saves us from pointless churn - git keeps history for us - the year range is kept in COPYING checksrc is updated to allow non-year using copyright statements Closes #10205
show more ...
|
#
6f9fb7ec |
| 05-Sep-2022 |
Daniel Stenberg |
misc: ISSPACE() => ISBLANK() Instances of ISSPACE() use that should rather use ISBLANK(). I think somewhat carelessly used because it sounds as if it checks for space or whitespace,
misc: ISSPACE() => ISBLANK() Instances of ISSPACE() use that should rather use ISBLANK(). I think somewhat carelessly used because it sounds as if it checks for space or whitespace, but also includes %0a to %0d. For parsing purposes, we should only accept what we must and not be overly liberal. It leads to surprises and surprises lead to bad things. Closes #9432
show more ...
|
#
ad9bc597 |
| 17-May-2022 |
max.mehl |
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the
copyright: make repository REUSE compliant Add licensing and copyright information for all files in this repository. This either happens in the file itself as a comment header or in the file `.reuse/dep5`. This commit also adds a Github workflow to check pull requests and adapts copyright.pl to the changes. Closes #8869
show more ...
|
Revision tags: curl-7_76_1, curl-7_76_0, curl-7_75_0, curl-7_74_0 |
|
#
ac0a88fd |
| 05-Nov-2020 |
Daniel Stenberg |
copyright: fix year ranges Follow-up from 4d2f8006777
|
#
4d2f8006 |
| 04-Nov-2020 |
Daniel Stenberg |
curl.se: new home Closes #6172
|
Revision tags: curl-7_73_0, tiny-curl-7_72_0, curl-7_72_0, curl-7_71_1, curl-7_71_0, curl-7_70_0, curl-7_69_1, curl-7_69_0, curl-7_68_0 |
|
#
c6deecd7 |
| 09-Dec-2019 |
Daniel Stenberg |
curl: use errorf() better Change series of error outputs to use errorf(). Only errors that are due to mistakes in command line option usage should use helpf(), other types of er
curl: use errorf() better Change series of error outputs to use errorf(). Only errors that are due to mistakes in command line option usage should use helpf(), other types of errors in the tool should rather use errorf(). Closes #4691
show more ...
|
#
7dffc2b4 |
| 02-Dec-2019 |
Daniel Stenberg |
curl: show better error message when no homedir is found Reported-by: Vlastimil Ovčáčík Fixes #4644 Closes #4665
|
Revision tags: curl-7_67_0 |
|
#
0bc60d91 |
| 02-Nov-2019 |
Daniel Stenberg |
copyrights: fix copyright year range .. because checksrc's copyright year check stopped working. Ref: https://github.com/curl/curl/pull/4547 Closes https://github.com/curl/
copyrights: fix copyright year range .. because checksrc's copyright year check stopped working. Ref: https://github.com/curl/curl/pull/4547 Closes https://github.com/curl/curl/pull/4549
show more ...
|
Revision tags: curl-7_66_0, curl-7_65_3, curl-7_65_2, curl-7_65_1, curl-7_65_0, curl-7_64_1, curl-7_64_0, curl-7_63_0, curl-7_62_0 |
|
#
d530e92f |
| 27-Oct-2018 |
Daniel Stenberg |
voutf: fix bad arethmetic when outputting warnings to stderr CVE-2018-16842 Reported-by: Brian Carpenter Bug: https://curl.haxx.se/docs/CVE-2018-16842.html
|
#
b801b453 |
| 23-Sep-2018 |
Viktor Szakats |
whitespace fixes - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few inde
whitespace fixes - replace tabs with spaces where possible - remove line ending spaces - remove double/triple newlines at EOF - fix a non-UTF-8 character - cleanup a few indentations/line continuations in manual examples Closes https://github.com/curl/curl/pull/3037
show more ...
|
Revision tags: curl-7_61_1, curl-7_61_0 |
|
#
c45360d4 |
| 02-Jun-2018 |
Marian Klymov |
cppcheck: fix warnings - Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over
cppcheck: fix warnings - Get rid of variable that was generating false positive warning (unitialized) - Fix issues in tests - Reduce scope of several variables all over etc Closes #2631
show more ...
|
Revision tags: curl-7_60_0, curl-7_59_0, curl-7_58_0 |
|
#
5d0ba70e |
| 12-Dec-2017 |
Daniel Stenberg |
curl: support >256 bytes warning messsages Bug: #2174
|