-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curl fails at make check with Perl 5.41.7 / 5.41.8 due to "Possible precedence problem between ! and string eq" in runtests.pl #16128
Comments
The condition `!$cmdtype eq "perl"` (introduced in a4765b0) is always false. It checks whether a logical negation (giving true/false) is equal to the string `"perl"`. This is impossible, so the logging never worked. The intent was probably to negate the result of the string comparison:`!($cmdtype eq "perl"` or simply `$cmdtype ne "perl"`. Fixes curl#16128.
The condition `!$cmdtype eq "perl"` (introduced in a4765b0) is always false. It checks whether a logical negation (giving true/false) is equal to the string `"perl"`. This is impossible, so the logging never worked. The intent was probably to negate the result of the string comparison:`!($cmdtype eq "perl")` or simply `$cmdtype ne "perl"`. Fixes curl#16128.
The affected line does
This is wrong, and perl is rightly giving a warning here. The code is equivalent to
when what was undoubtedly meant was
|
Also note that the script has set «use warnings FATAL => 'all';». That promotes these warnings to exceptions. I'm not sure that's a good idea for a script like this where you can't control the version of perl other people will run it on: it means that any existent version of curl can break with a future perl when it adds a warning like this. It's probably more appropriate to use non-fatal warnings here. |
While this is useful on CI to highlight issues in the scripts, it's a recipe for pain when enabled on users' builds. Suggested-by: Leon Timmermans Ref: #16128
I did this
Curl fails at make check with Perl 5.41.7 due to:
See related issue: Perl/perl5#22954 (comment)
I expected the following
make check to run clean
curl/libcurl version
curl 8.11.1
operating system
any
The text was updated successfully, but these errors were encountered: