tidy-up: miscellaneous

- examples: sync debug output printf masks.
- INSTALL-CMAKE.md: tidy up section for some options.
- curl_sha512_256: delete comment suggesting an optimization.
- vtls/keylog: scope a variable.
- vtls/openssl: make a source code URL a permalink.
- vtls/schannel: drop redundant parentheses.
- test1119.pl: robustify `$1` -> `$s`.
- sync arg names in comments to match the code.
- tidy up and minor fixes to comments.
- fix formatting/indenting/comment/newline/include nits.
- move `UNITTEST` protos next to definitions, sync their argument names.
- make variables static.
- add parentheses to Perl `open()` calls.
- drop unnecessary double quotes in Perl.
- clang-format.

Closes #21000
This commit is contained in:
Viktor Szakats 2026-03-09 12:27:12 +01:00
parent 3512b673dd
commit e0dd6eb4a4
No known key found for this signature in database
148 changed files with 612 additions and 684 deletions

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "llist.h"
static void test_Curl_llist_dtor(void *key, void *value)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "url.h" /* for curlx_safefree */

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"
@ -50,10 +49,10 @@ static void t1303_stop(struct Curl_easy *easy)
#define BASE 1000000
/* macro to set the pretended current time */
#define NOW(x,y) now.tv_sec = x; now.tv_usec = y
#define NOW(x, y) now.tv_sec = x; now.tv_usec = y
/* macro to set the millisecond based timeouts to use */
#define TIMEOUTS(x,y) easy->set.timeout = x; \
easy->set.connecttimeout = y
#define TIMEOUTS(x, y) easy->set.timeout = x; \
easy->set.connecttimeout = y
/*
* To test:

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_NETRC
#include "netrc.h"
static void t1304_stop(char **password, char **login)

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_FTP
#include "curl_fnmatch.h"
/*

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "splay.h"
static void splayprint(struct Curl_tree *t, int d, char output)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "vtls/hostcheck.h"
static CURLcode test_unit1397(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "progress.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "curl_ntlm_core.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_md5.h"
static CURLcode test_unit1601(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "hash.h"
static void t1602_mydtor(void *p)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "hash.h"
static const size_t slots = 3;

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "llist.h"
static CURLcode t1605_setup(CURL **easy)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"
#include "curl_addrinfo.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "connect.h"
#include "curl_addrinfo.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_sha256.h"
static CURLcode t1610_setup(void)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_md4.h"
static CURLcode test_unit1611(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_hmac.h"
#include "curl_md5.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "noproxy.h"
static CURLcode test_unit1614(const char *arg)

View file

@ -23,7 +23,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "curl_sha512_256.h"
static CURLcode test_unit1615(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "url.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_HTTP
#include "urldata.h"
#include "url.h"
@ -126,8 +125,7 @@ static CURLcode test_unit1625(const char *arg)
return CURLE_OK;
}
#else
/* for HTTP-disabled builds */
#else /* CURL_DISABLE_HTTP */
static CURLcode test_unit1625(const char *arg)
{
(void)arg;

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_HTTP
#include "urldata.h"
#include "url.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "url.h"
#include "strcase.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "vtls/x509asn1.h"
static CURLcode test_unit1651(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "curl_trc.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "altsvc.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_MBEDTLS)
#include "vtls/x509asn1.h"
struct test_spec {

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#if defined(USE_GNUTLS) || defined(USE_SCHANNEL) || defined(USE_MBEDTLS)
#include "vtls/x509asn1.h"
struct test1657_spec {

View file

@ -25,7 +25,6 @@
/* DoH + HTTPSRR are required */
#if !defined(CURL_DISABLE_DOH) && defined(USE_HTTPSRR)
#include "doh.h"
#include "httpsrr.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_HSTS)
#include "urldata.h"
#include "hsts.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "bufq.h"
#include "curl_trc.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "dynhds.h"
#include "curl_trc.h"

View file

@ -24,7 +24,6 @@
#include "unitcheck.h"
#ifndef CURL_DISABLE_HTTP
#include "urldata.h"
#include "http1.h"
#include "curl_trc.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "vtls/cipher_suite.h"
static CURLcode test_unit3205(const char *arg)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "uint-table.h"
#include "curl_trc.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
#include "uint-spbset.h"
#include "curl_trc.h"

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "urldata.h"
static void checksize(const char *name, size_t size, size_t allowed)

View file

@ -22,7 +22,6 @@
*
***************************************************************************/
#include "unitcheck.h"
#include "ratelimit.h"
static CURLcode test_unit3216(const char *arg)