summaryrefslogtreecommitdiff
path: root/src/win32.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
committersmatz <smatz@openttd.org>2009-05-10 17:27:25 +0000
commitf5316c5cbd13c3ce8c0a7d8b652ce7d975c17438 (patch)
treee9c57e3fa45a652740e681f7d25b731d7b2f9cfb /src/win32.cpp
parent552f10bb09667a7c36724092d290808c2c9e51b4 (diff)
downloadopenttd-f5316c5cbd13c3ce8c0a7d8b652ce7d975c17438.tar.xz
(svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
Diffstat (limited to 'src/win32.cpp')
-rw-r--r--src/win32.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/win32.cpp b/src/win32.cpp
index 066ea628b..471801e93 100644
--- 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 *name, char *utf8_buf, size_t buflen)
{
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, wchar_t *utf16_buf, size_t buflen)
{
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';
}