summaryrefslogtreecommitdiffstats
path: root/win/rfb_win32/TsSessions.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-03-03 16:26:03 +0100
committerPierre Ossman <ossman@cendio.se>2015-03-03 16:26:03 +0100
commit5c23b9ed7d55a2cd5f44b8ec3da2c8bdcac5c3a5 (patch)
tree8c3438ffdacb5188cae93df720219fb96c242505 /win/rfb_win32/TsSessions.cxx
parenta7bbe9c4a3b2090240173e45bebab86e5cba3b4b (diff)
downloadtigervnc-5c23b9ed7d55a2cd5f44b8ec3da2c8bdcac5c3a5.tar.gz
tigervnc-5c23b9ed7d55a2cd5f44b8ec3da2c8bdcac5c3a5.zip
Fix bad signed/unsigned comparisons
Either by casting, or switching to a more appropriate type for the variable.
Diffstat (limited to 'win/rfb_win32/TsSessions.cxx')
-rw-r--r--win/rfb_win32/TsSessions.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win/rfb_win32/TsSessions.cxx b/win/rfb_win32/TsSessions.cxx
index efe75640..a4fac2f9 100644
--- a/win/rfb_win32/TsSessions.cxx
+++ b/win/rfb_win32/TsSessions.cxx
@@ -48,7 +48,7 @@ namespace win32 {
id = 0;
if (!_ProcessIdToSessionId.isValid())
return;
- if (processId == -1)
+ if (processId == (DWORD)-1)
processId = GetCurrentProcessId();
if (!(*_ProcessIdToSessionId)(GetCurrentProcessId(), &id))
throw rdr::SystemException("ProcessIdToSessionId", GetLastError());
@@ -72,7 +72,7 @@ namespace win32 {
#ifdef RFB_HAVE_WINSTATION_CONNECT
if (!_WinStationConnect.isValid())
throw rdr::Exception("WinSta APIs missing");
- if (sessionId == -1)
+ if (sessionId == (DWORD)-1)
sessionId = mySessionId.id;
// Try to reconnect our session to the console