[Spice-devel] [PATCH 4/6] mingw: fix signed/unsigned comparison warnings

Christophe Fergeau cfergeau at redhat.com
Wed Feb 29 10:01:57 PST 2012


---
 client/red_client.h                |    2 +-
 client/windows/event_sources_p.cpp |    2 +-
 client/windows/red_window.cpp      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/red_client.h b/client/red_client.h
index 8872ce8..577ccb7 100644
--- a/client/red_client.h
+++ b/client/red_client.h
@@ -375,7 +375,7 @@ private:
 
     GlzDecoderWindowDebug _glz_debug;
     GlzDecoderWindow _glz_window;
-    int _glz_window_size; // in pixels
+    unsigned int _glz_window_size; // in pixels
 
     Mutex _mm_clock_lock;
     uint64_t _mm_clock_last_update;
diff --git a/client/windows/event_sources_p.cpp b/client/windows/event_sources_p.cpp
index 7703573..bbf48d9 100644
--- a/client/windows/event_sources_p.cpp
+++ b/client/windows/event_sources_p.cpp
@@ -94,7 +94,7 @@ bool EventSources::wait_events(int timeout_ms)
     size_t event_index = wait_res - WAIT_OBJECT_0;
     if (event_index == _handles.size()) {
         return process_system_events();
-    } else if ((event_index >= 0) && (event_index < (int)_handles.size())) {
+    } else if ((event_index >= 0) && (event_index < _handles.size())) {
         _events[event_index]->action();
         return false;
     } else {
diff --git a/client/windows/red_window.cpp b/client/windows/red_window.cpp
index 89a33c9..fcb033b 100644
--- a/client/windows/red_window.cpp
+++ b/client/windows/red_window.cpp
@@ -69,7 +69,7 @@ static bool is_fake_ctrl(UINT message, WPARAM wParam, LPARAM lParam)
             LONG time = GetMessageTime();
             BOOL msg_exist = PeekMessage(&next_msg, NULL,
                 next_peek, next_peek, PM_NOREMOVE);
-            if ((msg_exist == TRUE) && (next_msg.time == time) &&
+            if ((msg_exist == TRUE) && ((LONG)next_msg.time == time) &&
                 (next_msg.wParam == VK_MENU) &&
                 (HIWORD (next_msg.lParam) & KF_EXTENDED)) {
                     return true;
-- 
1.7.7.6



More information about the Spice-devel mailing list