tidy-up: docs, comments, typos, whitespace

- GHA/windows: mention `IgnoreStandardErrorWarningFormat=true`
  in comment.
- cmake: fix MIT/GNU GSS order in messages.
- drop some exclamation marks from messages.
- drop redundant ending newlines from messages.
- fold/unfold where possible.
- fix indent, whitespace, typos and other nits.

Closes #22185
This commit is contained in:
Viktor Szakats 2026-06-15 14:33:20 +02:00
parent 15bd6c5d4c
commit 397b8f0ec6
No known key found for this signature in database
47 changed files with 157 additions and 150 deletions

View file

@ -287,8 +287,7 @@ test3216 test3217 test3218 test3219 test3220 test3221 test3222 \
\
test3300 test3301 test3302 test3303 test3304 test3305 \
\
test3400 \
test3401 \
test3400 test3401 \
\
test4000 test4001

View file

@ -2884,7 +2884,7 @@ sub customize {
$retrnosize = 1;
}
elsif($_ =~ /RETRSIZE (\d+)/) {
$retrsize= $1;
$retrsize = $1;
logmsg "FTPD: instructed to use RETRSIZE = $1\n";
}
elsif($_ =~ /PASVBADIP/) {

View file

@ -121,8 +121,8 @@ class TestFtpsVsFTPD:
curl = CurlClient(env=env)
docname = 'data-1k'
count = 2
url1= f'ftps://{env.ftp_domain}:{vsftpds.port}/{docname}'
url2 = f'ftp://{env.ftp_domain}:{vsftpds.port}/{docname}'
url1 = f'ftps://{env.ftp_domain}:{vsftpds.port}/{docname}'
url2 = f'ftp://{env.ftp_domain}:{vsftpds.port}/{docname}'
r = curl.ftp_get(urls=[url1, url2], with_stats=True)
r.check_stats(count=count, http_status=226)
assert r.total_connects == count + 1, 'should reuse the control conn'

View file

@ -94,8 +94,8 @@ static CURLcode test_lib668(const char *URL)
curl_mime_data_cb(part, (curl_off_t)-1, t668_read_cb, NULL, NULL, &pooh2);
part = curl_mime_addpart(mime);
curl_mime_name(part, "field3");
/* Regular file part sources early end of data can be detected because
the file size is known. In addition, and EOF test is performed. */
/* For regular file parts, early end of data can be detected because
the file size is known. In addition, an EOF test is performed. */
curl_mime_filedata(part, libtest_arg2);
/* Bind mime data to its easy handle. */

View file

@ -558,7 +558,7 @@ sub checksystemfeatures {
$curl = $_;
$CURLVERSION = $1;
$CURLVERNUM = $CURLVERSION;
$CURLVERNUM =~ s/^([0-9.]+)(.*)/$1/; # leading dots and numbers
$CURLVERNUM =~ s/^([0-9.]+)(.*)/$1/; # leading digits and dots
$curl =~ s/^(.*)(libcurl.*)/$1/g or die "Failure determining curl binary version";
$libcurl = $2;
@ -983,7 +983,7 @@ sub citest_starttest {
my $testnum = $_[0];
# get the name of the test early
my $testname= (getpart("client", "name"))[0];
my $testname = (getpart("client", "name"))[0];
chomp $testname;
# create test result in CI services
@ -1234,7 +1234,7 @@ sub singletest_count {
logmsg sprintf("test %04d...", $testnum) if(!$automakestyle);
# name of the test
my $testname= (getpart("client", "name"))[0];
my $testname = (getpart("client", "name"))[0];
chomp $testname;
logmsg "[$testname]\n" if(!$short);
@ -1280,7 +1280,7 @@ sub singletest_check {
my $ok = "";
my $res;
chomp $errorcode;
my $testname= (getpart("client", "name"))[0];
my $testname = (getpart("client", "name"))[0];
chomp $testname;
# what parts to cut off from stdout/stderr
@ -1429,7 +1429,7 @@ sub singletest_check {
my @strippart = getpart("verify", "strippart");
# this is the valid protocol blurb curl should generate
my @protocol= getpart("verify", "protocol");
my @protocol = getpart("verify", "protocol");
if(@protocol) {
# Verify the sent request
my @out = loadarray("$logdir/$SERVERIN");
@ -1447,7 +1447,7 @@ sub singletest_check {
# strip off all lines that match the patterns from both arrays
chomp $_;
@out = striparray( $_, \@out);
@protocol= striparray( $_, \@protocol);
@protocol = striparray( $_, \@protocol);
}
for my $strip (@strippart) {
@ -1617,7 +1617,7 @@ sub singletest_check {
# strip off all lines that match the patterns from both arrays
chomp $_;
@out = striparray( $_, \@out);
@proxyprot= striparray( $_, \@proxyprot);
@proxyprot = striparray( $_, \@proxyprot);
}
for my $strip (@strippart) {
@ -1951,8 +1951,8 @@ sub singletest_check {
sub singletest_success {
my ($testnum, $count, $total, $errorreturncode) = @_;
my $sofar= time()-$start;
my $esttotal = $sofar/$count * $total;
my $sofar = time() - $start;
my $esttotal = $sofar / $count * $total;
my $estleft = $esttotal - $sofar;
my $timeleft = sprintf("remaining: %02d:%02d",
$estleft / 60,
@ -1965,7 +1965,7 @@ sub singletest_success {
$count, $total, $timeleft, $took, $duration);
}
else {
my $testname= (getpart("client", "name"))[0];
my $testname = (getpart("client", "name"))[0];
chomp $testname;
logmsg "PASS: $testnum - $testname\n";
}

View file

@ -722,7 +722,7 @@ static void read_instructions(void)
rc = buf[0] ? 0 : 1;
}
if(rc != 1) {
logmsg("Bad line in %s: '%s'\n", file, buf);
logmsg("Bad line in %s: '%s'", file, buf);
}
else if(rtype) {
logmsg("added %s record via '%s'", rtype, buf);

View file

@ -738,7 +738,7 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req)
break;
case DOCNUMBER_404:
default:
logmsg("Replying to with a 404");
logmsg("Replying with a 404");
if(req->protocol == RPROT_HTTP) {
buffer = doc404_HTTP;
}

View file

@ -721,7 +721,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req)
test case send a rejection before any such data has been sent. Test case
154 uses this.*/
if(req->auth_req && !req->auth) {
logmsg("Return early due to auth requested by none provided");
logmsg("Return early due to auth requested but none provided");
return 1; /* done */
}
@ -813,7 +813,7 @@ static int sws_send_doc(curl_socket_t sock, struct sws_httprequest *req)
break;
case DOCNUMBER_404:
default:
logmsg("Replying to with a 404");
logmsg("Replying with a 404");
buffer = doc404;
break;
}
@ -1893,11 +1893,11 @@ static int service_connection(curl_socket_t *msgsock,
/* if we got a CONNECT, loop and get another request as well! */
if(req->open) {
logmsg("=> persistent connection request ended, awaits new request\n");
logmsg("=> persistent connection request ended, awaits new request");
return 1;
}
else {
logmsg("=> NOT a persistent connection, close close CLOSE\n");
logmsg("=> NOT a persistent connection, close close CLOSE");
}
return -1;
@ -2036,7 +2036,7 @@ static int test_sws(int argc, const char *argv[])
opt = argv[arg];
if(curlx_str_number(&opt, &num, 0xffff)) {
fprintf(stderr, "sws: invalid --keepalive argument (%s), must "
"be number of seconds\n", argv[arg]);
"be a number of seconds\n", argv[arg]);
return 0;
}
keepalive_secs = (unsigned short)num;

View file

@ -287,7 +287,7 @@ static void nak(int error)
memcpy(tp->th_msg, pe->e_msg, length + 1);
length += 5;
if(swrite(peer, &trsbuf.storage[0], length) != length)
logmsg("nak: fail\n");
logmsg("nak: fail");
}
/*

View file

@ -336,23 +336,18 @@ typedef void (*SIGHANDLER_T)(int);
#ifdef SIGHUP
static SIGHANDLER_T old_sighup_handler = SIG_ERR;
#endif
#ifdef SIGPIPE
static SIGHANDLER_T old_sigpipe_handler = SIG_ERR;
#endif
#ifdef SIGALRM
static SIGHANDLER_T old_sigalrm_handler = SIG_ERR;
#endif
#ifdef SIGINT
static SIGHANDLER_T old_sigint_handler = SIG_ERR;
#endif
#ifdef SIGTERM
static SIGHANDLER_T old_sigterm_handler = SIG_ERR;
#endif
#if defined(SIGBREAK) && defined(_WIN32)
static SIGHANDLER_T old_sigbreak_handler = SIG_ERR;
#endif
@ -502,8 +497,8 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT uMsg,
}
return DefWindowProc(hwnd, uMsg, wParam, lParam);
}
/* Window message queue loop for hidden main window, details see above.
*/
/* Window message queue loop for hidden main window, details see above. */
static DWORD WINAPI main_window_loop(void *lpParameter)
{
WNDCLASS wc;

View file

@ -114,7 +114,7 @@ my @curlmopt;
open($r, "<", $syms) or die "no input file";
while(<$r>) {
chomp;
my $l= $_;
my $l = $_;
if($l =~ /(CURL(OPT|INFO|MOPT)_\w+) *([0-9.]*) *([0-9.-]*) *([0-9.]*)/) {
my ($opt, $type, $add, $dep, $rem) = ($1, $2, $3, $4, $5);
@ -232,7 +232,7 @@ open($r, "<", "$buildroot/docs/cmdline-opts/curl.1") or
my @manpage; # store all parsed parameters
while(<$r>) {
chomp;
my $l= $_;
my $l = $_;
$l =~ s/\\-/-/g;
if($l =~ /^\.IP \"(-[^\"]*)\"/) {
my $str = $1;
@ -259,7 +259,7 @@ open($r, "<", "$root/src/tool_listhelp.c") or die "no input file";
my @toolhelp; # store all parsed parameters
while(<$r>) {
chomp;
my $l= $_;
my $l = $_;
if(/^ \{ \" *(.*)/) {
my $str = $1;
my $combo;

View file

@ -91,7 +91,7 @@ sub file {
$errors++;
}
if($l =~ /^\.BR (.*)/) {
my $i= $1;
my $i = $1;
while($i =~ s/((lib|)curl([^ ]*)) *\"\(3\)(,|) *\" *//i ) {
my $man = "$1.3";
$man =~ s/\\//g; # cut off backslashes

View file

@ -90,19 +90,19 @@ static CURLcode test_unit2413(const char *arg)
}
test_create2413("peer1", curl, &Curl_scheme_https, "test.curl.se", 1234,
"test.curl.se", FALSE, NULL);
"test.curl.se", FALSE, NULL);
test_create2413("peer2", curl, &Curl_scheme_https, "127.0.0.1", 1234,
"127.0.0.1", FALSE, NULL);
"127.0.0.1", FALSE, NULL);
test_create2413("peer3", curl, &Curl_scheme_https, "::1", 1234,
"::1", TRUE, NULL);
"::1", TRUE, NULL);
test_create2413("peer3", curl, &Curl_scheme_https, "[::1]", 1234,
"::1", TRUE, NULL);
"::1", TRUE, NULL);
test_create2413("peer4", curl, &Curl_scheme_https, "test.curl.se.", 1234,
"test.curl.se.", FALSE, NULL);
"test.curl.se.", FALSE, NULL);
test_create2413("peer5", curl, &Curl_scheme_https, "[::1%tada]", 1234,
"::1", TRUE, "tada");
"::1", TRUE, "tada");
test_create2413("peer6", curl, &Curl_scheme_https, "::1%tada", 1234,
"::1", TRUE, "tada");
"::1", TRUE, "tada");
curl_easy_cleanup(curl);
Curl_peer_unlink(&peer);