libtests: update format strings to avoid casts, drop some macros

- bump format strings to show the full value, drop casts.
- drop redundant casts (enum -> `%d`).
- drop some single-use macros.
- replace `int` with `bool` in testtrace.

Closes #18106
This commit is contained in:
Viktor Szakats 2025-07-30 02:12:22 +02:00
parent e5cf6223d7
commit 37913c01a5
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
63 changed files with 293 additions and 303 deletions

View file

@ -84,11 +84,11 @@ static int server_push_callback(CURL *parent,
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out_push);
curl_mfprintf(stderr, "**** push callback approves stream %u, "
"got %lu headers!\n", count, (unsigned long)num_headers);
"got %zu headers!\n", count, num_headers);
for(i = 0; i < num_headers; i++) {
headp = curl_pushheader_bynum(headers, i);
curl_mfprintf(stderr, "**** header %lu: %s\n", (unsigned long)i, headp);
curl_mfprintf(stderr, "**** header %zu: %s\n", i, headp);
}
headp = curl_pushheader_byname(headers, ":path");
@ -114,8 +114,8 @@ static CURLcode test_cli_h2_serverpush(const char *URL)
int transfers = 1; /* we start with one */
struct CURLMsg *m;
debug_config.nohex = 1;
debug_config.tracetime = 0;
debug_config.nohex = TRUE;
debug_config.tracetime = FALSE;
if(!URL) {
curl_mfprintf(stderr, "need URL as argument\n");