src: tidy up types, add necessary casts

Cherry-picked from #13489
Closes #13614
This commit is contained in:
Viktor Szakats 2024-05-13 12:17:33 +02:00
parent d0728c9109
commit 1a89538347
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
14 changed files with 30 additions and 32 deletions

View file

@ -97,15 +97,15 @@ static void print_category(curlhelp_t category, unsigned int cols)
for(i = 0; helptext[i].opt; ++i)
if(helptext[i].categories & category) {
int opt = (int)longopt;
size_t opt = longopt;
size_t desclen = strlen(helptext[i].desc);
if(opt + desclen >= (cols - 2)) {
if(desclen < (cols - 2))
opt = (cols - 3) - (int)desclen;
opt = (cols - 3) - desclen;
else
opt = 0;
}
printf(" %-*s %s\n", opt, helptext[i].opt, helptext[i].desc);
printf(" %-*s %s\n", (int)opt, helptext[i].opt, helptext[i].desc);
}
}