diff options
author | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:34:56 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2015-03-03 16:34:56 +0100 |
commit | fb450fba5d8737310a1f205ea3d38467dedf6afa (patch) | |
tree | 64408b35ce3d358703ff928975eebd4be319b5ba | |
parent | 64624342d98c62563c2a78b117ce3fcea9b61e68 (diff) | |
download | tigervnc-fb450fba5d8737310a1f205ea3d38467dedf6afa.tar.gz tigervnc-fb450fba5d8737310a1f205ea3d38467dedf6afa.zip |
Fix mismatches between format string and arguments
-rw-r--r-- | common/rfb/KeyRemapper.cxx | 2 | ||||
-rw-r--r-- | tests/decperf.cxx | 2 | ||||
-rw-r--r-- | vncviewer/CConn.cxx | 2 | ||||
-rw-r--r-- | vncviewer/Viewport.cxx | 2 | ||||
-rw-r--r-- | vncviewer/parameters.cxx | 16 | ||||
-rw-r--r-- | win/rfb_win32/CleanDesktop.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/Clipboard.cxx | 6 | ||||
-rw-r--r-- | win/rfb_win32/DeviceContext.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/Dialog.cxx | 10 | ||||
-rw-r--r-- | win/rfb_win32/DynamicFn.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/MonitorInfo.cxx | 6 | ||||
-rw-r--r-- | win/rfb_win32/MsgWindow.cxx | 6 | ||||
-rw-r--r-- | win/rfb_win32/Registry.cxx | 14 | ||||
-rw-r--r-- | win/rfb_win32/SInput.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/Security.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/Service.cxx | 22 | ||||
-rw-r--r-- | win/rfb_win32/Threading.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/TsSessions.cxx | 2 | ||||
-rw-r--r-- | win/winvnc/winvnc.cxx | 2 |
19 files changed, 55 insertions, 55 deletions
diff --git a/common/rfb/KeyRemapper.cxx b/common/rfb/KeyRemapper.cxx index 05f07632..d33f0a45 100644 --- a/common/rfb/KeyRemapper.cxx +++ b/common/rfb/KeyRemapper.cxx @@ -50,7 +50,7 @@ void KeyRemapper::setMapping(const char* m) { if (bidi == '<') mapping[to] = from; } else { - vlog.error("warning: bad mapping %.*s", nextComma-m, m); + vlog.error("warning: bad mapping %.*s", (int)(nextComma-m), m); } m = nextComma; if (nextComma[0]) diff --git a/tests/decperf.cxx b/tests/decperf.cxx index 1d0c80c4..5763976c 100644 --- a/tests/decperf.cxx +++ b/tests/decperf.cxx @@ -211,7 +211,7 @@ int main(int argc, char **argv) sort(dev, runCount); meddev = dev[runCount/2]; - printf("CPU time: %g s (+/- %g %)\n", median, meddev); + printf("CPU time: %g s (+/- %g %%)\n", median, meddev); return 0; } diff --git a/vncviewer/CConn.cxx b/vncviewer/CConn.cxx index ab5c9ccc..f8b45af2 100644 --- a/vncviewer/CConn.cxx +++ b/vncviewer/CConn.cxx @@ -411,7 +411,7 @@ void CConn::serverCutText(const char* str, rdr::U32 len) ret = fl_utf8froma(buffer, size, str, len); assert(ret < size); - vlog.debug("Got clipboard data (%d bytes)", strlen(buffer)); + vlog.debug("Got clipboard data (%d bytes)", (int)strlen(buffer)); // RFB doesn't have separate selection and clipboard concepts, so we // dump the data into both variants. diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 6c77e583..3d6f4a84 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -351,7 +351,7 @@ int Viewport::handle(int event) Fl::event_length() + 1); assert(ret < (Fl::event_length() + 1)); - vlog.debug("Sending clipboard data (%d bytes)", strlen(buffer)); + vlog.debug("Sending clipboard data (%d bytes)", (int)strlen(buffer)); try { cc->writer()->clientCutText(buffer, ret); diff --git a/vncviewer/parameters.cxx b/vncviewer/parameters.cxx index 29a5397d..713ac070 100644 --- a/vncviewer/parameters.cxx +++ b/vncviewer/parameters.cxx @@ -303,7 +303,7 @@ static void setKeyString(const char *_name, const char *_value, HKEY* hKey) { LONG res = RegSetValueExW(*hKey, name, 0, REG_SZ, (BYTE*)&value, (wcslen(value)+1)*2); if (res != ERROR_SUCCESS) { - vlog.error(_("Failed to write parameter %s of type %s to the registry: %d"), + vlog.error(_("Failed to write parameter %s of type %s to the registry: %ld"), _name, "REG_SZ", res); return; } @@ -324,7 +324,7 @@ static void setKeyInt(const char *_name, const int _value, HKEY* hKey) { LONG res = RegSetValueExW(*hKey, name, 0, REG_DWORD, (BYTE*)&value, sizeof(DWORD)); if (res != ERROR_SUCCESS) { - vlog.error(_("Failed to write parameter %s of type %s to the registry: %d"), + vlog.error(_("Failed to write parameter %s of type %s to the registry: %ld"), _name, "REG_DWORD", res); return; } @@ -348,7 +348,7 @@ static bool getKeyString(const char* _name, char* dest, size_t destSize, HKEY* h if (res == ERROR_FILE_NOT_FOUND) { // The value does not exist, defaults will be used. } else { - vlog.error(_("Failed to read parameter %s from the registry: %d"), + vlog.error(_("Failed to read parameter %s from the registry: %ld"), _name, res); } return false; @@ -387,7 +387,7 @@ static bool getKeyInt(const char* _name, int* dest, HKEY* hKey) { if (res == ERROR_FILE_NOT_FOUND) { // The value does not exist, defaults will be used. } else { - vlog.error(_("Failed to read parameter %s from the registry: %d"), + vlog.error(_("Failed to read parameter %s from the registry: %ld"), _name, res); } return false; @@ -407,7 +407,7 @@ static void saveToReg(const char* servername) { REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL); if (res != ERROR_SUCCESS) { - vlog.error(_("Failed to create registry key: %d"), res); + vlog.error(_("Failed to create registry key: %ld"), res); return; } @@ -428,7 +428,7 @@ static void saveToReg(const char* servername) { res = RegCloseKey(hKey); if (res != ERROR_SUCCESS) { - vlog.error(_("Failed to close registry key: %d"), res); + vlog.error(_("Failed to close registry key: %ld"), res); } } @@ -444,7 +444,7 @@ static char* loadFromReg() { if (res == ERROR_FILE_NOT_FOUND) { // The key does not exist, defaults will be used. } else { - vlog.error(_("Failed to open registry key: %d"), res); + vlog.error(_("Failed to open registry key: %ld"), res); } return NULL; } @@ -477,7 +477,7 @@ static char* loadFromReg() { res = RegCloseKey(hKey); if (res != ERROR_SUCCESS){ - vlog.error(_("Failed to close registry key: %d"), res); + vlog.error(_("Failed to close registry key: %ld"), res); } return servername; diff --git a/win/rfb_win32/CleanDesktop.cxx b/win/rfb_win32/CleanDesktop.cxx index bad95f0a..90b3451b 100644 --- a/win/rfb_win32/CleanDesktop.cxx +++ b/win/rfb_win32/CleanDesktop.cxx @@ -148,7 +148,7 @@ DWORD SysParamsInfo(UINT action, UINT param, PVOID ptr, UINT ini) { DWORD r = ERROR_SUCCESS; if (!SystemParametersInfo(action, param, ptr, ini)) { r = GetLastError(); - vlog.info("SPI error: %d", r); + vlog.info("SPI error: %lu", r); } return r; } diff --git a/win/rfb_win32/Clipboard.cxx b/win/rfb_win32/Clipboard.cxx index 482519e7..70f52ad4 100644 --- a/win/rfb_win32/Clipboard.cxx +++ b/win/rfb_win32/Clipboard.cxx @@ -87,7 +87,7 @@ Clipboard::Clipboard() } Clipboard::~Clipboard() { - vlog.debug("removing %x from chain (next is %x)", getHandle(), next_window); + vlog.debug("removing %p from chain (next is %p)", getHandle(), next_window); ChangeClipboardChain(getHandle(), next_window); } @@ -111,7 +111,7 @@ Clipboard::processMessage(UINT msg, WPARAM wParam, LPARAM lParam) { if (owner == getHandle()) { vlog.debug("local clipboard changed by me"); } else { - vlog.debug("local clipboard changed by %x", owner); + vlog.debug("local clipboard changed by %p", owner); // Open the clipboard if (OpenClipboard(getHandle())) { @@ -190,7 +190,7 @@ Clipboard::setClipText(const char* text) { // - Close the clipboard if (!CloseClipboard()) - vlog.debug("unable to close Win32 clipboard: %u", GetLastError()); + vlog.debug("unable to close Win32 clipboard: %lu", GetLastError()); else vlog.debug("closed clipboard"); if (clip_handle) { diff --git a/win/rfb_win32/DeviceContext.cxx b/win/rfb_win32/DeviceContext.cxx index 26721a60..ad5e6b1c 100644 --- a/win/rfb_win32/DeviceContext.cxx +++ b/win/rfb_win32/DeviceContext.cxx @@ -91,7 +91,7 @@ PixelFormat DeviceContext::getPF(HDC dc) { rMask = bi.mask.red; gMask = bi.mask.green; bMask = bi.mask.blue; - vlog.info("%lu-bit BitFields: (%lx, %lx, %lx)", + vlog.info("%d-bit BitFields: (%lx, %lx, %lx)", bi.bmiHeader.biBitCount, rMask, gMask, bMask); break; }; diff --git a/win/rfb_win32/Dialog.cxx b/win/rfb_win32/Dialog.cxx index 70a5fb56..6b52244d 100644 --- a/win/rfb_win32/Dialog.cxx +++ b/win/rfb_win32/Dialog.cxx @@ -278,7 +278,7 @@ bool PropSheet::showPropSheet(HWND owner, bool showApply, bool showCtxtHelp, boo if ((handle == 0) || (handle == (HWND)-1)) throw rdr::SystemException("PropertySheet failed", GetLastError()); centerWindow(handle, owner); - plog.info("created %lx", handle); + plog.info("created %p", handle); #ifdef _DIALOG_CAPTURE if (capture) { @@ -336,7 +336,7 @@ bool PropSheet::showPropSheet(HWND owner, bool showApply, bool showCtxtHelp, boo } #endif - plog.info("finished %lx", handle); + plog.info("finished %p", handle); DestroyWindow(handle); handle = 0; @@ -361,7 +361,7 @@ bool PropSheet::showPropSheet(HWND owner, bool showApply, bool showCtxtHelp, boo } void PropSheet::reInitPages() { - plog.debug("reInitPages %lx", handle); + plog.debug("reInitPages %p", handle); std::list<PropSheetPage*>::iterator pspi; for (pspi=pages.begin(); pspi!=pages.end(); pspi++) { if ((*pspi)->handle) @@ -370,7 +370,7 @@ void PropSheet::reInitPages() { } bool PropSheet::commitPages() { - plog.debug("commitPages %lx", handle); + plog.debug("commitPages %p", handle); bool result = true; std::list<PropSheetPage*>::iterator pspi; for (pspi=pages.begin(); pspi!=pages.end(); pspi++) { @@ -383,7 +383,7 @@ bool PropSheet::commitPages() { void PropSheetPage::setChanged(bool changed) { if (propSheet) { - plog.debug("setChanged[%lx(%lx)]=%d", handle, propSheet->handle, (int)changed); + plog.debug("setChanged[%p(%p)]=%d", handle, propSheet->handle, (int)changed); if (changed) PropSheet_Changed(propSheet->handle, handle); else diff --git a/win/rfb_win32/DynamicFn.cxx b/win/rfb_win32/DynamicFn.cxx index 033971d3..97d17ff7 100644 --- a/win/rfb_win32/DynamicFn.cxx +++ b/win/rfb_win32/DynamicFn.cxx @@ -29,12 +29,12 @@ static LogWriter vlog("DynamicFn"); DynamicFnBase::DynamicFnBase(const TCHAR* dllName, const char* fnName) : fnPtr(0), dllHandle(0) { dllHandle = LoadLibrary(dllName); if (!dllHandle) { - vlog.info("DLL %s not found (%d)", (const char*)CStr(dllName), GetLastError()); + vlog.info("DLL %s not found (%lu)", (const char*)CStr(dllName), GetLastError()); return; } fnPtr = (void*) GetProcAddress(dllHandle, fnName); if (!fnPtr) - vlog.info("proc %s not found in %s (%d)", fnName, (const char*)CStr(dllName), GetLastError()); + vlog.info("proc %s not found in %s (%lu)", fnName, (const char*)CStr(dllName), GetLastError()); } DynamicFnBase::~DynamicFnBase() { diff --git a/win/rfb_win32/MonitorInfo.cxx b/win/rfb_win32/MonitorInfo.cxx index c57cd26c..d639ac56 100644 --- a/win/rfb_win32/MonitorInfo.cxx +++ b/win/rfb_win32/MonitorInfo.cxx @@ -50,15 +50,15 @@ static rfb::win32::DynamicFn<_GetMonitorInfo_proto> _GetMonitorInfo(_T("user32.d typedef BOOL (WINAPI *_EnumDisplayMonitors_proto)(HDC, LPCRECT, MONITORENUMPROC, LPARAM); static rfb::win32::DynamicFn<_EnumDisplayMonitors_proto> _EnumDisplayMonitors(_T("user32.dll"), "EnumDisplayMonitors"); static void fillMonitorInfo(HMONITOR monitor, MonitorInfo* mi) { - vlog.debug("monitor=%lx", monitor); + vlog.debug("monitor=%p", monitor); if (!_GetMonitorInfo.isValid()) throw rdr::Exception("no GetMonitorInfo"); memset(mi, 0, sizeof(MONITORINFOEXA)); mi->cbSize = sizeof(MONITORINFOEXA); if (!(*_GetMonitorInfo)(monitor, mi)) throw rdr::SystemException("failed to GetMonitorInfo", GetLastError()); - vlog.debug("monitor is %d,%d-%d,%d", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom); - vlog.debug("work area is %d,%d-%d,%d", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom); + vlog.debug("monitor is %ld,%ld-%ld,%ld", mi->rcMonitor.left, mi->rcMonitor.top, mi->rcMonitor.right, mi->rcMonitor.bottom); + vlog.debug("work area is %ld,%ld-%ld,%ld", mi->rcWork.left, mi->rcWork.top, mi->rcWork.right, mi->rcWork.bottom); vlog.debug("device is \"%s\"", mi->szDevice); } #else diff --git a/win/rfb_win32/MsgWindow.cxx b/win/rfb_win32/MsgWindow.cxx index 4c50c2fd..1d585618 100644 --- a/win/rfb_win32/MsgWindow.cxx +++ b/win/rfb_win32/MsgWindow.cxx @@ -52,7 +52,7 @@ LRESULT CALLBACK MsgWindowProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam) SetWindowLongPtr(wnd, GWLP_USERDATA, 0); MsgWindow* _this = (MsgWindow*) GetWindowLongPtr(wnd, GWLP_USERDATA); if (!_this) { - vlog.info("null _this in %x, message %x", wnd, msg); + vlog.info("null _this in %p, message %x", wnd, msg); return SafeDefWindowProc(wnd, msg, wParam, lParam); } @@ -102,13 +102,13 @@ MsgWindow::MsgWindow(const TCHAR* name_) : name(tstrDup(name_)), handle(0) { if (!handle) { throw rdr::SystemException("unable to create WMNotifier window instance", GetLastError()); } - vlog.debug("created window \"%s\" (%x)", (const char*)CStr(name.buf), handle); + vlog.debug("created window \"%s\" (%p)", (const char*)CStr(name.buf), handle); } MsgWindow::~MsgWindow() { if (handle) DestroyWindow(handle); - vlog.debug("destroyed window \"%s\" (%x)", (const char*)CStr(name.buf), handle); + vlog.debug("destroyed window \"%s\" (%p)", (const char*)CStr(name.buf), handle); } LRESULT diff --git a/win/rfb_win32/Registry.cxx b/win/rfb_win32/Registry.cxx index b278576c..70083f4a 100644 --- a/win/rfb_win32/Registry.cxx +++ b/win/rfb_win32/Registry.cxx @@ -51,7 +51,7 @@ RegKey::RegKey(const HKEY k) : key(0), freeKey(false), valueNameBufLen(0) { LONG result = RegOpenKeyEx(k, 0, 0, KEY_ALL_ACCESS, &key); if (result != ERROR_SUCCESS) throw rdr::SystemException("RegOpenKeyEx(HKEY)", result); - vlog.debug("duplicated %x to %x", k, key); + vlog.debug("duplicated %p to %p", k, key); freeKey = true; } @@ -59,7 +59,7 @@ RegKey::RegKey(const RegKey& k) : key(0), freeKey(false), valueNameBufLen(0) { LONG result = RegOpenKeyEx(k.key, 0, 0, KEY_ALL_ACCESS, &key); if (result != ERROR_SUCCESS) throw rdr::SystemException("RegOpenKeyEx(RegKey&)", result); - vlog.debug("duplicated %x to %x", k.key, key); + vlog.debug("duplicated %p to %p", k.key, key); freeKey = true; } @@ -69,7 +69,7 @@ RegKey::~RegKey() { void RegKey::setHKEY(HKEY k, bool fK) { - vlog.debug("setHKEY(%x,%d)", k, (int)fK); + vlog.debug("setHKEY(%p,%d)", k, (int)fK); close(); freeKey = fK; key = k; @@ -80,10 +80,10 @@ bool RegKey::createKey(const RegKey& root, const TCHAR* name) { close(); LONG result = RegCreateKey(root.key, name, &key); if (result != ERROR_SUCCESS) { - vlog.error("RegCreateKey(%x, %s): %x", root.key, name, result); + vlog.error("RegCreateKey(%p, %s): %lx", root.key, name, result); throw rdr::SystemException("RegCreateKeyEx", result); } - vlog.debug("createKey(%x,%s) = %x", root.key, (const char*)CStr(name), key); + vlog.debug("createKey(%p,%s) = %p", root.key, (const char*)CStr(name), key); freeKey = true; return true; } @@ -93,7 +93,7 @@ void RegKey::openKey(const RegKey& root, const TCHAR* name, bool readOnly) { LONG result = RegOpenKeyEx(root.key, name, 0, readOnly ? KEY_READ : KEY_ALL_ACCESS, &key); if (result != ERROR_SUCCESS) throw rdr::SystemException("RegOpenKeyEx (open)", result); - vlog.debug("openKey(%x,%s,%s) = %x", root.key, (const char*)CStr(name), + vlog.debug("openKey(%p,%s,%s) = %p", root.key, (const char*)CStr(name), readOnly ? "ro" : "rw", key); freeKey = true; } @@ -113,7 +113,7 @@ void RegKey::setDACL(const PACL acl, bool inherit) { void RegKey::close() { if (freeKey) { - vlog.debug("RegCloseKey(%x)", key); + vlog.debug("RegCloseKey(%p)", key); RegCloseKey(key); key = 0; } diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx index aa8a21bc..f6345665 100644 --- a/win/rfb_win32/SInput.cxx +++ b/win/rfb_win32/SInput.cxx @@ -151,7 +151,7 @@ win32::SPointer::pointerEvent(const Point& pos, int buttonmask) flags &= ~MOUSEEVENTF_ABSOLUTE; SystemParametersInfo(SPI_GETMOUSE, 0, &mouseInfo, 0); SystemParametersInfo(SPI_GETMOUSESPEED, 0, &oldSpeed, 0); - vlog.debug("SPI_GETMOUSE %d, %d, %d, speed %d", mouseInfo[0], mouseInfo[1], mouseInfo[2], oldSpeed); + vlog.debug("SPI_GETMOUSE %lu, %lu, %lu, speed %lu", mouseInfo[0], mouseInfo[1], mouseInfo[2], oldSpeed); ULONG idealMouseInfo[] = {10, 0, 0}; SystemParametersInfo(SPI_SETMOUSESPEED, 0, &newSpeed, 0); SystemParametersInfo(SPI_SETMOUSE, 0, &idealMouseInfo, 0); @@ -266,7 +266,7 @@ latin1ToDeadChars_t latin1ToDeadChars[] = { // the appropriate scancode corresponding to the supplied virtual keycode. inline void doKeyboardEvent(BYTE vkCode, DWORD flags) { - vlog.debug("vkCode 0x%x flags 0x%x", vkCode, flags); + vlog.debug("vkCode 0x%x flags 0x%lx", vkCode, flags); keybd_event(vkCode, MapVirtualKey(vkCode, 0), flags, 0); } diff --git a/win/rfb_win32/Security.cxx b/win/rfb_win32/Security.cxx index 95ef1d8a..b4e93530 100644 --- a/win/rfb_win32/Security.cxx +++ b/win/rfb_win32/Security.cxx @@ -112,7 +112,7 @@ void Sid::getUserNameAndDomain(TCHAR** name, TCHAR** domain) { LookupAccountSid(0, (PSID)buf, 0, &nameLen, 0, &domainLen, &use); if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) throw rdr::SystemException("Unable to determine SID name lengths", GetLastError()); - vlog.info("nameLen=%d, domainLen=%d, use=%d", nameLen, domainLen, use); + vlog.info("nameLen=%lu, domainLen=%lu, use=%d", nameLen, domainLen, use); *name = new TCHAR[nameLen]; *domain = new TCHAR[domainLen]; if (!LookupAccountSid(0, (PSID)buf, *name, &nameLen, *domain, &domainLen, &use)) diff --git a/win/rfb_win32/Service.cxx b/win/rfb_win32/Service.cxx index 89be92e1..99b3eaa1 100644 --- a/win/rfb_win32/Service.cxx +++ b/win/rfb_win32/Service.cxx @@ -99,7 +99,7 @@ VOID WINAPI serviceProc(DWORD dwArgc, LPTSTR* lpszArgv) { vlog.error("failed to register handler: %lu", err); ExitProcess(err); } - vlog.debug("registered handler (%lx)", service->status_handle); + vlog.debug("registered handler (%p)", service->status_handle); service->setStatus(SERVICE_START_PENDING); vlog.debug("entering %s serviceMain", service->getName()); service->status.dwWin32ExitCode = service->serviceMain(dwArgc, lpszArgv); @@ -132,7 +132,7 @@ Service::start() { entry[1].lpServiceProc = NULL; vlog.debug("entering dispatcher"); if (!SetProcessShutdownParameters(0x100, 0)) - vlog.error("unable to set shutdown parameters: %d", GetLastError()); + vlog.error("unable to set shutdown parameters: %lu", GetLastError()); service = this; if (!StartServiceCtrlDispatcher(entry)) throw SystemException("unable to start service", GetLastError()); @@ -176,9 +176,9 @@ Service::setStatus(DWORD state) { if (!SetServiceStatus(status_handle, &status)) { status.dwCurrentState = SERVICE_STOPPED; status.dwWin32ExitCode = GetLastError(); - vlog.error("unable to set service status:%u", status.dwWin32ExitCode); + vlog.error("unable to set service status:%lu", status.dwWin32ExitCode); } - vlog.debug("set status to %u(%u)", state, status.dwCheckPoint); + vlog.debug("set status to %lu(%lu)", state, status.dwCheckPoint); } Service::~Service() { @@ -200,11 +200,11 @@ static bool switchToDesktop(HDESK desktop) { HDESK old_desktop = GetThreadDesktop(GetCurrentThreadId()); if (!SetThreadDesktop(desktop)) { - vlog.debug("switchToDesktop failed:%u", GetLastError()); + vlog.debug("switchToDesktop failed:%lu", GetLastError()); return false; } if (!CloseDesktop(old_desktop)) - vlog.debug("unable to close old desktop:%u", GetLastError()); + vlog.debug("unable to close old desktop:%lu", GetLastError()); return true; } @@ -218,7 +218,7 @@ inputDesktopSelected() { DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | GENERIC_WRITE); if (!input) { - vlog.debug("unable to OpenInputDesktop(1):%u", GetLastError()); + vlog.debug("unable to OpenInputDesktop(1):%lu", GetLastError()); return false; } @@ -227,17 +227,17 @@ inputDesktopSelected() { char inputname[256]; if (!GetUserObjectInformation(current, UOI_NAME, currentname, 256, &size)) { - vlog.debug("unable to GetUserObjectInformation(1):%u", GetLastError()); + vlog.debug("unable to GetUserObjectInformation(1):%lu", GetLastError()); CloseDesktop(input); return false; } if (!GetUserObjectInformation(input, UOI_NAME, inputname, 256, &size)) { - vlog.debug("unable to GetUserObjectInformation(2):%u", GetLastError()); + vlog.debug("unable to GetUserObjectInformation(2):%lu", GetLastError()); CloseDesktop(input); return false; } if (!CloseDesktop(input)) - vlog.debug("unable to close input desktop:%u", GetLastError()); + vlog.debug("unable to close input desktop:%lu", GetLastError()); // *** vlog.debug("current=%s, input=%s", currentname, inputname); bool result = strcmp(currentname, inputname) == 0; @@ -254,7 +254,7 @@ selectInputDesktop() { DESKTOP_WRITEOBJECTS | DESKTOP_READOBJECTS | DESKTOP_SWITCHDESKTOP | GENERIC_WRITE); if (!desktop) { - vlog.debug("unable to OpenInputDesktop(2):%u", GetLastError()); + vlog.debug("unable to OpenInputDesktop(2):%lu", GetLastError()); return false; } diff --git a/win/rfb_win32/Threading.cxx b/win/rfb_win32/Threading.cxx index 79607662..5873b58f 100644 --- a/win/rfb_win32/Threading.cxx +++ b/win/rfb_win32/Threading.cxx @@ -34,11 +34,11 @@ static DWORD threadStorage = TlsAlloc(); inline void logAction(Thread* t, const char* action) { - vlog.debug("%-16.16s %s(%lx)", action, t->getName(), t); + vlog.debug("%-16.16s %s(%p)", action, t->getName(), t); } inline void logError(Thread* t, const char* err) { - vlog.error("%-16.16s %s(%lx):%s", "failed", t->getName(), t, err); + vlog.error("%-16.16s %s(%p):%s", "failed", t->getName(), t, err); } diff --git a/win/rfb_win32/TsSessions.cxx b/win/rfb_win32/TsSessions.cxx index a4fac2f9..b02f6195 100644 --- a/win/rfb_win32/TsSessions.cxx +++ b/win/rfb_win32/TsSessions.cxx @@ -77,7 +77,7 @@ namespace win32 { // Try to reconnect our session to the console ConsoleSessionId console; - vlog.info("Console session is %d", console.id); + vlog.info("Console session is %lu", console.id); if (!(*_WinStationConnect)(0, sessionId, console.id, L"", 0)) throw rdr::SystemException("Unable to connect session to Console", GetLastError()); diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index 17b3a91c..c2abd892 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -182,7 +182,7 @@ static void processParams(int argc, char** argv) { close_console = true; vlog.info("closing console"); if (!FreeConsole()) - vlog.info("unable to close console:%u", GetLastError()); + vlog.info("unable to close console:%lu", GetLastError()); } else if ((strcasecmp(argv[i], "-help") == 0) || (strcasecmp(argv[i], "--help") == 0) || |