diff --git a/src/win32.cpp b/src/win32.cpp --- a/src/win32.cpp +++ b/src/win32.cpp @@ -1082,13 +1082,13 @@ void DetermineBasePaths(const char *exe) _searchpaths[SP_WORKING_DIR] = strdup(tmp); if (!GetModuleFileName(NULL, path, lengthof(path))) { - DEBUG(misc, 0, "GetModuleFileName failed (%d)\n", GetLastError()); + DEBUG(misc, 0, "GetModuleFileName failed (%lu)\n", GetLastError()); _searchpaths[SP_BINARY_DIR] = NULL; } else { TCHAR exec_dir[MAX_PATH]; _tcsncpy(path, MB_TO_WIDE_BUFFER(exe, path, lengthof(path)), lengthof(path)); if (!GetFullPathName(path, lengthof(exec_dir), exec_dir, NULL)) { - DEBUG(misc, 0, "GetFullPathName failed (%d)\n", GetLastError()); + DEBUG(misc, 0, "GetFullPathName failed (%lu)\n", GetLastError()); _searchpaths[SP_BINARY_DIR] = NULL; } else { strecpy(tmp, WIDE_TO_MB_BUFFER(exec_dir, tmp, lengthof(tmp)), lastof(tmp)); @@ -1281,7 +1281,7 @@ char *convert_from_fs(const wchar_t *nam { int len = WideCharToMultiByte(CP_UTF8, 0, name, -1, utf8_buf, (int)buflen, NULL, NULL); if (len == 0) { - DEBUG(misc, 0, "[utf8] W2M error converting wide-string. Errno %d", GetLastError()); + DEBUG(misc, 0, "[utf8] W2M error converting wide-string. Errno %lu", GetLastError()); utf8_buf[0] = '\0'; } @@ -1300,7 +1300,7 @@ wchar_t *convert_to_fs(const char *name, { int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, utf16_buf, (int)buflen); if (len == 0) { - DEBUG(misc, 0, "[utf8] M2W error converting '%s'. Errno %d", name, GetLastError()); + DEBUG(misc, 0, "[utf8] M2W error converting '%s'. Errno %lu", name, GetLastError()); utf16_buf[0] = '\0'; }