summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/windows/cpu-affinity.c10
-rw-r--r--os/windows/posix.c5
2 files changed, 7 insertions, 8 deletions
diff --git a/os/windows/cpu-affinity.c b/os/windows/cpu-affinity.c
index 4ac32ed1..46fd048d 100644
--- a/os/windows/cpu-affinity.c
+++ b/os/windows/cpu-affinity.c
@@ -14,7 +14,7 @@ int fio_setaffinity(int pid, os_cpu_mask_t cpumask)
bSuccess = SetThreadAffinityMask(h, cpumask);
if (!bSuccess)
log_err("fio_setaffinity failed: failed to set thread affinity (pid %d, mask %.16llx)\n",
- pid, cpumask);
+ pid, (long long unsigned) cpumask);
CloseHandle(h);
} else {
@@ -261,10 +261,8 @@ int fio_setaffinity(int pid, os_cpu_mask_t cpumask)
if (SetThreadGroupAffinity(handle, &new_group_affinity, NULL) != 0)
ret = 0;
else {
- log_err("fio_setaffinity: failed to set thread affinity "
- "(pid %d, group %d, mask %" PRIx64 ", "
- "GetLastError=%d)\n", pid, group, group_mask,
- GetLastError());
+ log_err("fio_setaffinity: failed to set thread affinity (pid %d, group %d, mask %" PRIx64 ", GetLastError=%lu)\n",
+ pid, group, group_mask, GetLastError());
goto err;
}
@@ -323,7 +321,7 @@ int fio_getaffinity(int pid, os_cpu_mask_t *mask)
goto err;
}
if (!GetProcessGroupAffinity(handle, &group_count, current_groups)) {
- log_err("%s: failed to get single group affinity for pid %d (%d)\n",
+ log_err("%s: failed to get single group affinity for pid %d (%lu)\n",
__func__, pid, GetLastError());
goto err;
}
diff --git a/os/windows/posix.c b/os/windows/posix.c
index 31271de0..9e9f12ef 100644
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -168,7 +168,7 @@ int win_to_posix_error(DWORD winerr)
case ERROR_FILE_INVALID:
return ENXIO;
default:
- log_err("fio: windows error %d not handled\n", winerr);
+ log_err("fio: windows error %lu not handled\n", winerr);
return EIO;
}
@@ -188,7 +188,8 @@ int GetNumLogicalProcessors(void)
if (error == ERROR_INSUFFICIENT_BUFFER)
processor_info = malloc(len);
else {
- log_err("Error: GetLogicalProcessorInformation failed: %d\n", error);
+ log_err("Error: GetLogicalProcessorInformation failed: %lu\n",
+ error);
return -1;
}