mirror of
https://github.com/curl/curl.git
synced 2026-05-30 04:27:30 +03:00
tool_filetime: replace cast with the fitting printf mask (Windows)
Follow-up to d25b050379 #2204
Closes #18858
This commit is contained in:
parent
b54b4697ca
commit
c93457f1f6
1 changed files with 8 additions and 10 deletions
|
|
@ -62,16 +62,14 @@ int getfiletime(const char *filename, curl_off_t *stamp)
|
|||
}
|
||||
}
|
||||
else {
|
||||
warnf("Failed to get filetime: "
|
||||
"GetFileTime failed: GetLastError %u",
|
||||
(unsigned int)GetLastError());
|
||||
warnf("Failed to get filetime: GetFileTime failed: GetLastError %lu",
|
||||
GetLastError());
|
||||
}
|
||||
CloseHandle(hfile);
|
||||
}
|
||||
else if(GetLastError() != ERROR_FILE_NOT_FOUND) {
|
||||
warnf("Failed to get filetime: "
|
||||
"CreateFile failed: GetLastError %u",
|
||||
(unsigned int)GetLastError());
|
||||
warnf("Failed to get filetime: CreateFile failed: GetLastError %lu",
|
||||
GetLastError());
|
||||
}
|
||||
#else
|
||||
struct_stat statbuf;
|
||||
|
|
@ -117,15 +115,15 @@ void setfiletime(curl_off_t filetime, const char *filename)
|
|||
ft.dwHighDateTime = (DWORD)(converted >> 32);
|
||||
if(!SetFileTime(hfile, NULL, &ft, &ft)) {
|
||||
warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
|
||||
" on outfile: SetFileTime failed: GetLastError %u",
|
||||
filetime, (unsigned int)GetLastError());
|
||||
" on outfile: SetFileTime failed: GetLastError %lu",
|
||||
filetime, GetLastError());
|
||||
}
|
||||
CloseHandle(hfile);
|
||||
}
|
||||
else {
|
||||
warnf("Failed to set filetime %" CURL_FORMAT_CURL_OFF_T
|
||||
" on outfile: CreateFile failed: GetLastError %u",
|
||||
filetime, (unsigned int)GetLastError());
|
||||
" on outfile: CreateFile failed: GetLastError %lu",
|
||||
filetime, GetLastError());
|
||||
}
|
||||
|
||||
#elif defined(HAVE_UTIMES)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue