comctl32. Fix some unsigned/signed warnings showing with MSVC standard warning level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changelog
  * dlls/comctl32/comboex.c
  * dlls/comctl32/comctl32undoc.c
  * dlls/comctl32/progress.c
  * dlls/comctl32/propsheet.c
  * dlls/comctl32/rebar.c
    Fix some unsigned/signed warnings showing with MSVC standard warning level

  * dlls/comctl32/treeview.c
    Add config.h/port.h to allow compilation/linking in MSVC 

Rolf Kalbermatter

Index: dlls/comctl32/comboex.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comboex.c,v
retrieving revision 1.61
diff -u -r1.61 comboex.c
--- dlls/comctl32/comboex.c	2 Dec 2002 18:11:00 -0000	1.61
+++ dlls/comctl32/comboex.c	16 Dec 2002 18:48:58 -0000
@@ -1231,7 +1231,7 @@
 {
     CBE_ITEMDATA *item, *olditem;
     NMCOMBOBOXEXW nmcit;
-    INT i;
+    UINT i;
 
     TRACE("CtlType=%08x, CtlID=%08x, itemID=%08x, hwnd=%p, data=%08lx\n",
 	  dis->CtlType, dis->CtlID, dis->itemID, dis->hwndItem, dis->itemData);

Index: dlls/comctl32/comctl32undoc.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/comctl32undoc.c,v
retrieving revision 1.74
diff -u -r1.74 comctl32undoc.c
--- dlls/comctl32/comctl32undoc.c	13 Dec 2002 23:25:59 -0000	1.74
+++ dlls/comctl32/comctl32undoc.c	16 Dec 2002 18:46:37 -0000
@@ -29,6 +29,8 @@
  *     - Add more functions.
  *     - Write some documentation.
  */
+#include <config.h>
+#include <wine/port.h>
 
 #include <string.h>
 #include <stdlib.h> /* atoi */
@@ -512,7 +514,7 @@
  */
 VOID MRU_SaveChanged( LPWINEMRULIST mp )
 {
-    INT i, err;
+    UINT i, err;
     HKEY newkey;
     WCHAR realname[2];
     LPWINEMRUITEM witem;
@@ -580,7 +582,7 @@
 FreeMRUList (HANDLE hMRUList)
 {
     LPWINEMRULIST mp = (LPWINEMRULIST)hMRUList;
-    INT i;
+    UINT i;
 
     TRACE("\n");
     if (mp->wineFlags & WMRUF_CHANGED) {
@@ -619,7 +621,7 @@
 FindMRUData (HANDLE hList, LPCVOID lpData, DWORD cbData, LPINT lpRegNum)
 {
     LPWINEMRULIST mp = (LPWINEMRULIST)hList;
-    INT i, ret;
+    UINT i, ret;
     LPSTR dataA = NULL;
 
     if (!mp->extview.lpfnCompare) {
@@ -838,7 +840,7 @@
  */
 HANDLE CreateMRUListLazy_common(LPWINEMRULIST mp)
 {
-    INT i, err;
+    UINT i, err;
     HKEY newkey;
     DWORD datasize, dwdisp;
     WCHAR realname[2];

Index: dlls/comctl32/progress.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/progress.c,v
retrieving revision 1.29
diff -u -r1.29 progress.c
--- dlls/comctl32/progress.c	2 Dec 2002 18:10:59 -0000	1.29
+++ dlls/comctl32/progress.c	16 Dec 2002 18:50:50 -0000
@@ -334,7 +334,7 @@
 
     case PBM_SETPOS:
     {
-	INT oldVal;
+        UINT oldVal;
         oldVal = infoPtr->CurVal;
         if(oldVal != wParam) {
 	    infoPtr->CurVal = (INT)wParam;

Index: dlls/comctl32/propsheet.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/propsheet.c,v
retrieving revision 1.76
diff -u -r1.76 propsheet.c
--- dlls/comctl32/propsheet.c	6 Dec 2002 23:19:54 -0000	1.76
+++ dlls/comctl32/propsheet.c	16 Dec 2002 18:56:14 -0000
@@ -2382,7 +2382,7 @@
   int bRet = 0;
   PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
                                                        sizeof(PropSheetInfo));
-  int i, n;
+  UINT i, n;
   BYTE* pByte;
 
   TRACE("(%p)\n", lppsh);
@@ -2426,7 +2426,7 @@
   int bRet = 0;
   PropSheetInfo* psInfo = (PropSheetInfo*) GlobalAlloc(GPTR,
                                                        sizeof(PropSheetInfo));
-  int i, n;
+  UINT i, n;
   BYTE* pByte;
 
   TRACE("(%p)\n", lppsh);

Index: dlls/comctl32/rebar.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/rebar.c,v
retrieving revision 1.68
diff -u -r1.68 rebar.c
--- dlls/comctl32/rebar.c	3 Dec 2002 23:34:54 -0000	1.68
+++ dlls/comctl32/rebar.c	16 Dec 2002 18:57:50 -0000
@@ -1610,8 +1610,9 @@
     /* assumes that the following variables contain:                 */
     /*   y/x     current height/width of all rows                    */
     if (lpRect) {
-        INT i, j, prev_rh, new_rh, adj_rh, prev_idx, current_idx;
+        INT i, prev_rh, new_rh, adj_rh, prev_idx, current_idx;
 	REBAR_BAND *prev, *current, *walk;
+	UINT j;
 
 /* FIXME:  problem # 2 */
 	if (((infoPtr->dwStyle & CCS_VERT) ?
@@ -1748,7 +1749,8 @@
 
     if (((infoPtr->dwStyle & CCS_VERT) ? clientcx > x : clientcy > y) &&
 	infoPtr->uNumBands) {
-	INT diff, i, iband, j;
+	INT diff, i, iband;
+	UINT j;
 
 	diff = (infoPtr->dwStyle & CCS_VERT) ? clientcx - x : clientcy - y;
 	for (i = infoPtr->uNumRows; i >= 1; i--) {
@@ -1893,7 +1895,7 @@
 {
     UINT header=0;
     UINT textheight=0;
-    INT i, nonfixed;
+    UINT i, nonfixed;
     REBAR_BAND *tBand;
 
     lpBand->fStatus = 0;
@@ -2112,7 +2114,8 @@
      /*  separators are drawn on the first band of the next row.    */
 {
     REBAR_BAND *lpBand;
-    INT i, oldrow;
+    UINT i;
+	INT oldrow;
     HDC hdc = (HDC)wParam;
     RECT rect;
     COLORREF old = CLR_NONE, new;
@@ -2203,7 +2206,7 @@
 {
     REBAR_BAND *lpBand;
     RECT rect;
-    INT  iCount;
+    UINT  iCount;
 
     GetClientRect (infoPtr->hwndSelf, &rect);
 
@@ -2881,8 +2884,8 @@
 REBAR_GetRowHeight (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
     INT iRow = (INT)wParam;
-    int ret = 0;
-    int i, j = 0;
+    int j = 0, ret = 0;
+    UINT i;
     REBAR_BAND *lpBand;
 
     for (i=0; i<infoPtr->uNumBands; i++) {
@@ -3662,7 +3665,7 @@
 REBAR_Destroy (REBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
 {
     REBAR_BAND *lpBand;
-    INT i;
+    UINT i;
 
 
     /* free rebar bands */

Index: dlls/comctl32/treeview.c
===================================================================
RCS file: /home/wine/wine/dlls/comctl32/treeview.c,v
retrieving revision 1.110
diff -u -r1.110 treeview.c
--- dlls/comctl32/treeview.c	2 Dec 2002 18:10:59 -0000	1.110
+++ dlls/comctl32/treeview.c	16 Dec 2002 18:59:27 -0000
@@ -38,6 +38,9 @@
  *   Scroll (instead of repaint) as much as possible.
  */
 
+#include <config.h>
+#include <wine/port.h>
+
 #include <assert.h>
 #include <ctype.h>
 #include <string.h>




[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux