examples: replace casts with curl_off_t printf masks

Follow-up to e4ec666a3d #19112

Closes #19133
This commit is contained in:
Viktor Szakats 2025-10-19 10:53:16 +02:00
parent 8d302ec936
commit f6334f379d
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 29 additions and 20 deletions

View file

@ -53,14 +53,19 @@ static int xferinfo(void *p,
be used */
if((curtime - myp->lastruntime) >= MINIMAL_PROGRESS_FUNCTIONALITY_INTERVAL) {
myp->lastruntime = curtime;
fprintf(stderr, "TOTAL TIME: %lu.%06lu\r\n",
(unsigned long)(curtime / 1000000),
(unsigned long)(curtime % 1000000));
fprintf(stderr, "TOTAL TIME: %" CURL_FORMAT_CURL_OFF_T
".%06" CURL_FORMAT_CURL_OFF_T "\r\n",
curtime / 1000000,
curtime % 1000000);
}
fprintf(stderr, "UP: %lu of %lu DOWN: %lu of %lu\r\n",
(unsigned long)ulnow, (unsigned long)ultotal,
(unsigned long)dlnow, (unsigned long)dltotal);
fprintf(stderr,
"UP: "
"%" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T " "
"DOWN: "
"%" CURL_FORMAT_CURL_OFF_T " of %" CURL_FORMAT_CURL_OFF_T "\r\n",
ulnow, ultotal,
dlnow, dltotal);
if(dlnow > STOP_DOWNLOAD_AFTER_THIS_MANY_BYTES)
return 1;