win32: Fix format specifiers for DWORD values

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/458>
This commit is contained in:
Patrick Gaskin 2021-01-03 04:07:09 -05:00 committed by PulseAudio Marge Bot
parent 7ac0d90615
commit dd87e9f229
3 changed files with 5 additions and 5 deletions

View file

@ -510,7 +510,7 @@ int pa_thread_make_realtime(int rtprio) {
return 0;
}
pa_log_warn("SetThreadPriority() failed: 0x%08X", GetLastError());
pa_log_warn("SetThreadPriority() failed: 0x%08lX", GetLastError());
errno = EPERM;
#else
errno = ENOTSUP;

View file

@ -251,7 +251,7 @@ finish:
LocalFree(msgbuf);
} else {
pa_log_warn("FindFirstFile(%s) failed with error %ld, ignoring.", pattern, err);
pa_log_warn("FormatMessage failed with error %ld", GetLastError());
pa_log_warn("FormatMessage failed with error %lu", GetLastError());
}
}
}

View file

@ -759,7 +759,7 @@ int pa_raise_priority(int nice_level) {
#ifdef OS_IS_WIN32
if (nice_level < 0) {
if (!SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS)) {
pa_log_warn("SetPriorityClass() failed: 0x%08X", GetLastError());
pa_log_warn("SetPriorityClass() failed: 0x%08lX", GetLastError());
errno = EPERM;
return -1;
}
@ -1325,7 +1325,7 @@ int pa_lock_fd(int fd, int b) {
if (!b && UnlockFile(h, 0, 0, 0xFFFFFFFF, 0xFFFFFFFF))
return 0;
pa_log("%slock failed: 0x%08X", !b ? "un" : "", GetLastError());
pa_log("%slock failed: 0x%08lX", !b ? "un" : "", GetLastError());
/* FIXME: Needs to set errno! */
#endif
@ -3256,7 +3256,7 @@ char *pa_uname_string(void) {
i.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
pa_assert_se(GetVersionEx(&i));
return pa_sprintf_malloc("Windows %d.%d (%d) %s", i.dwMajorVersion, i.dwMinorVersion, i.dwBuildNumber, i.szCSDVersion);
return pa_sprintf_malloc("Windows %lu.%lu (%lu) %s", i.dwMajorVersion, i.dwMinorVersion, i.dwBuildNumber, i.szCSDVersion);
#endif
}