src: stop overriding system printf symbols

Also:
- tool_operate: use the socket printf mask, drop cast.

Follow-up to 4deea9396b #18814

Closes #18844
This commit is contained in:
Viktor Szakats 2025-10-04 12:24:57 +02:00
parent 34ad78da89
commit db98daab05
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
25 changed files with 203 additions and 207 deletions

View file

@ -208,12 +208,12 @@ int tool_progress_cb(void *clientp,
num = MAX_BARLENGTH;
memset(line, '#', num);
line[num] = '\0';
msnprintf(format, sizeof(format), "\r%%-%ds %%5.1f%%%%", barwidth);
curl_msnprintf(format, sizeof(format), "\r%%-%ds %%5.1f%%%%", barwidth);
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#endif
fprintf(bar->out, format, line, percent);
curl_mfprintf(bar->out, format, line, percent);
#ifdef __clang__
#pragma clang diagnostic pop
#endif