user32: Sign-compare warnings fix

Andrew Talbot andrew.talbot at talbotville.com
Tue Nov 18 16:09:46 CST 2008


Changelog:
    user32: Sign-compare warnings fix.

diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
index 9dd9083..4ea1959 100644
--- a/dlls/user32/dialog.c
+++ b/dlls/user32/dialog.c
@@ -84,9 +84,9 @@ typedef struct
   /* Radio button group */
 typedef struct
 {
-    UINT firstID;
-    UINT lastID;
-    UINT checkID;
+    INT firstID;
+    INT lastID;
+    INT checkID;
 } RADIOGROUP;
 
 
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index ed93eff..5198040 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -1111,7 +1111,7 @@ static void MENU_PopupMenuCalcSize( LPPOPUPMENU lppop )
 {
     MENUITEM *lpitem;
     HDC hdc;
-    int start, i;
+    UINT start, i;
     int orgX, orgY, maxX, maxTab, maxTabWidth, maxHeight;
 
     lppop->Width = lppop->Height = 0;
@@ -1199,7 +1199,8 @@ static void MENU_MenuBarCalcSize( HDC hdc, LPRECT lprect,
                                   LPPOPUPMENU lppop, HWND hwndOwner )
 {
     MENUITEM *lpitem;
-    int start, i, orgX, orgY, maxY, helpPos;
+    UINT start, i;
+    int orgX, orgY, maxY, helpPos;
 
     if ((lprect == NULL) || (lppop == NULL)) return;
     if (lppop->nItems == 0) return;
@@ -2671,7 +2672,7 @@ static LRESULT MENU_DoNextMenu( MTRACKER* pmt, UINT vk, UINT wFlags )
        icons such as MDI maximize, restore or close)             */
     else if ((vk == VK_RIGHT) && !IS_SYSTEM_MENU(menu))
     {
-        int i = menu->FocusedItem + 1;
+        UINT i = menu->FocusedItem + 1;
         while (i < menu->nItems) {
             if ((menu->items[i].wID >= SC_SIZE &&
                  menu->items[i].wID <= SC_RESTORE)) {
diff --git a/dlls/user32/spy.c b/dlls/user32/spy.c
index 2aed057..59fa410 100644
--- a/dlls/user32/spy.c
+++ b/dlls/user32/spy.c
@@ -2653,7 +2653,8 @@ void SPY_ExitMessage( INT iFlag, HWND hWnd, UINT msg, LRESULT lReturn,
  */
 int SPY_Init(void)
 {
-    int i, j;
+    int i;
+    UINT j;
     char buffer[1024];
     const SPY_NOTIFY *p;
     const USER_MSG *q;
@@ -2700,7 +2701,7 @@ int SPY_Init(void)
     p = &spnfy_array[0];
     j = 0xffffffff;
     while (p->name) {
-        if ((UINT)p->value > (UINT)j) {
+        if (p->value > j) {
             ERR("Notify message array out of order\n");
             ERR("  between values [%08x] %s and [%08x] %s\n",
                 j, (p-1)->name, p->value, p->name);



More information about the wine-patches mailing list