mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:33:31 +03:00
docs/examples: workaround broken -Wno-pedantic-ms-format
Avoid CURL_FORMAT_CURL_OFF_T by using unsigned long instead. Improve size_t to long conversion in imap-append.c example. Ref: https://github.com/curl/curl/issues/6079 Ref: https://github.com/curl/curl/pull/6082 Assisted-by: Jay Satiro Reviewed-by: Daniel Stenberg Preparation of #7922
This commit is contained in:
parent
52202691d1
commit
77311f420a
9 changed files with 45 additions and 45 deletions
|
|
@ -68,18 +68,16 @@ int main(void)
|
|||
if(res != CURLE_OK) {
|
||||
fprintf(stderr, "curl_easy_perform() failed: %s\n",
|
||||
curl_easy_strerror(res));
|
||||
|
||||
}
|
||||
else {
|
||||
/* now extract transfer info */
|
||||
curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed_upload);
|
||||
curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total_time);
|
||||
|
||||
fprintf(stderr, "Speed: %" CURL_FORMAT_CURL_OFF_T " bytes/sec during %"
|
||||
CURL_FORMAT_CURL_OFF_T ".%06ld seconds\n",
|
||||
speed_upload,
|
||||
(total_time / 1000000), (long)(total_time % 1000000));
|
||||
|
||||
fprintf(stderr, "Speed: %lu bytes/sec during %lu.%06lu seconds\n",
|
||||
(unsigned long)speed_upload,
|
||||
(unsigned long)(total_time / 1000000),
|
||||
(unsigned long)(total_time % 1000000));
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue