diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c index 9e2cf3ee63b..3f7e26210be 100644 --- a/dlls/x11drv/clipboard.c +++ b/dlls/x11drv/clipboard.c @@ -275,7 +275,7 @@ static UINT wSeqNo = 0; */ void X11DRV_InitClipboard(void) { - INT i; + UINT i; HKEY hkey; if(!RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Clipboard", &hkey)) @@ -1244,7 +1244,7 @@ HANDLE X11DRV_CLIPBOARD_ExportClipboardData(Window requestor, Atom aTarget, */ HANDLE X11DRV_CLIPBOARD_ExportXAString(LPWINE_CLIPDATA lpData, LPDWORD lpBytes) { - INT i, j; + UINT i, j; UINT size; LPWSTR uni_text; LPSTR text, lpstr; @@ -1466,7 +1466,7 @@ static BOOL X11DRV_CLIPBOARD_QueryTargets(Display *display, Window w, Atom selec */ static VOID X11DRV_CLIPBOARD_InsertSelectionProperties(Display *display, Atom* properties, UINT count) { - INT i, nb_atoms = 0; + UINT i, nb_atoms = 0; Atom *atoms = NULL; /* Cache these formats in the clipboard cache */ diff --git a/dlls/x11drv/clipping.c b/dlls/x11drv/clipping.c index 20721176593..4015d3c4645 100644 --- a/dlls/x11drv/clipping.c +++ b/dlls/x11drv/clipping.c @@ -39,7 +39,7 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp ) { RGNDATA *data; DWORD size; - int i; + unsigned int i; RECT *rect, tmp; XRectangle *xrect; diff --git a/dlls/x11drv/desktop.c b/dlls/x11drv/desktop.c index ac141d62038..173a749d6e8 100644 --- a/dlls/x11drv/desktop.c +++ b/dlls/x11drv/desktop.c @@ -187,7 +187,7 @@ int X11DRV_resize_desktop( unsigned int width, unsigned int height ) int X11DRV_desktop_GetCurrentMode(void) { - int i; + unsigned int i; DWORD dwBpp = screen_depth; if (dwBpp == 24) dwBpp = 32; for (i=0; i= 0) @@ -1676,7 +1677,7 @@ static void X11DRV_DIB_SetImageBits_RLE8( int lines, const BYTE *bits, int left, int *colors, XImage *bmpImage ) { - int x; /* X-positon on each line. Increases. */ + unsigned int x; /* X-position on each line. Increases. */ int y; /* Line #. Starts at lines-1, decreases */ const BYTE *pIn = bits; /* Pointer to current position in bits */ BYTE length; /* The length pf a run */ @@ -3607,7 +3608,7 @@ INT X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDest, DWO */ if (ySrc + cy <= startscan + lines) { - INT y = startscan + lines - (ySrc + cy); + UINT y = startscan + lines - (ySrc + cy); if (ySrc < startscan) cy -= (startscan - ySrc); if (!top_down) { @@ -4806,7 +4807,8 @@ HGLOBAL X11DRV_DIB_CreateDIBFromBitmap(HDC hdc, HBITMAP hBmp) HGLOBAL hPackedDIB; LPBYTE pPackedDIB; LPBITMAPINFOHEADER pbmiHeader; - unsigned int cDataSize, cPackedSize, OffsetBits, nLinesCopied; + unsigned int cDataSize, cPackedSize, OffsetBits; + int nLinesCopied; if (!GetObjectW( hBmp, sizeof(bmp), &bmp )) return 0; diff --git a/dlls/x11drv/event.c b/dlls/x11drv/event.c index f2d728ade2d..98f7c96cd40 100644 --- a/dlls/x11drv/event.c +++ b/dlls/x11drv/event.c @@ -580,7 +580,7 @@ static void EVENT_FocusOut( HWND hwnd, XFocusChangeEvent *event ) */ static BOOL EVENT_SelectionRequest_AddTARGETS(Atom* targets, unsigned long cTargets, Atom prop) { - int i; + unsigned int i; BOOL bExists; /* Scan through what we have so far to avoid duplicates */ @@ -669,7 +669,7 @@ static Atom EVENT_SelectionRequest_TARGETS( Display *display, Window requestor, if (TRACE_ON(clipboard)) { - int i; + unsigned int i; for ( i = 0; i < cTargets; i++) { if (targets[i]) @@ -752,7 +752,7 @@ static Atom EVENT_SelectionRequest_MULTIPLE( HWND hWnd, XSelectionRequestEvent * */ if(aformat == 32 /* atype == xAtomPair */ ) { - int i; + unsigned int i; /* Iterate through the ATOM_PAIR list and execute a SelectionRequest * for each (target,property) pair */ diff --git a/dlls/x11drv/graphics.c b/dlls/x11drv/graphics.c index 41f0d997ef5..cd06e0b3cf0 100644 --- a/dlls/x11drv/graphics.c +++ b/dlls/x11drv/graphics.c @@ -989,7 +989,7 @@ X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn ) { if (X11DRV_SetupGCForBrush( physDev )) { - int i; + unsigned int i; XRectangle *rect; RGNDATA *data = X11DRV_GetRegionData( hrgn, physDev->hdc ); @@ -1123,7 +1123,8 @@ X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts, if (X11DRV_SetupGCForPen ( physDev )) { - int i, j, max = 0; + unsigned int i; + int j, max = 0; XPoint *points; /* Update the pixmap from the DIB section */ @@ -1169,7 +1170,7 @@ X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* coun { if (X11DRV_SetupGCForPen ( physDev )) { - int i, j, max = 0; + unsigned int i, j, max = 0; XPoint *points; /* Update the pixmap from the DIB section */ diff --git a/dlls/x11drv/keyboard.c b/dlls/x11drv/keyboard.c index 85a292b9ca2..bb4bbc73408 100644 --- a/dlls/x11drv/keyboard.c +++ b/dlls/x11drv/keyboard.c @@ -1214,8 +1214,8 @@ static void X11DRV_KEYBOARD_DetectLayout (void) { Display *display = thread_display(); - unsigned current, match, mismatch, seq; - int score, keyc, i, key, pkey, ok, syms; + unsigned current, match, mismatch, seq, i, syms; + int score, keyc, key, pkey, ok; KeySym keysym; const char (*lkey)[MAIN_LEN][4]; unsigned max_seq = 0; diff --git a/dlls/x11drv/palette.c b/dlls/x11drv/palette.c index ce2e7d5d9c6..c9c1079d475 100644 --- a/dlls/x11drv/palette.c +++ b/dlls/x11drv/palette.c @@ -385,9 +385,10 @@ static BOOL X11DRV_PALETTE_BuildSharedMap( const PALETTEENTRY *sys_pal_template unsigned long* pixDynMapping = NULL; unsigned long plane_masks[1]; int i, j, warn = 0; - int diff, r, g, b, max = 256, bp = 0, wp = 1; + int diff, r, g, b, bp = 0, wp = 1; int step = 1; int defaultCM_max_copy; + unsigned int max = 256; Colormap defaultCM; XColor defaultColors[256]; HKEY hkey; diff --git a/dlls/x11drv/text.c b/dlls/x11drv/text.c index 48e0159cc55..dd787441bf5 100644 --- a/dlls/x11drv/text.c +++ b/dlls/x11drv/text.c @@ -45,7 +45,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags, const RECT *lprect, LPCWSTR wstr, UINT count, const INT *lpDx, INT breakExtra ) { - int i; + unsigned int i; fontObject* pfo; INT width, ascent, descent, xwidth, ywidth; XFontStruct* font; diff --git a/dlls/x11drv/x11ddraw.c b/dlls/x11drv/x11ddraw.c index 3d7e4570f98..22961c3fd28 100644 --- a/dlls/x11drv/x11ddraw.c +++ b/dlls/x11drv/x11ddraw.c @@ -432,7 +432,7 @@ void X11DRV_DDHAL_SetPalEntries(Colormap pal, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) { XColor c; - int n; + unsigned int n; if (pal) { wine_tsx11_lock(); diff --git a/dlls/x11drv/xfont.c b/dlls/x11drv/xfont.c index 2393d54b82d..821500957a2 100644 --- a/dlls/x11drv/xfont.c +++ b/dlls/x11drv/xfont.c @@ -331,7 +331,7 @@ static CRITICAL_SECTION crtsc_fonts_X11 = { &critsect_debug, -1, 0, 0, 0, 0 }; static fontResource* fontList = NULL; static fontObject* fontCache = NULL; /* array */ -static int fontCacheSize = FONTCACHE; +static unsigned int fontCacheSize = FONTCACHE; static int fontLF = -1, fontMRU = -1; /* last free, most recently used */ #define __PFONT(pFont) ( fontCache + ((UINT)(pFont) & 0x0000FFFF) ) @@ -1113,7 +1113,7 @@ static INT XFONT_GetAvgCharWidth( LPIFONTINFO16 pFI, const XFontStruct* x_fs, if( x_fs->per_char ) { - int width = 0, chars = 0, j; + unsigned int width = 0, chars = 0, j; if( (IS_LATIN_CHARSET(pFI->dfCharSet) || pFI->dfCharSet == DEFAULT_CHARSET) && (max - min) >= (unsigned char)'z' ) @@ -1150,7 +1150,7 @@ static INT XFONT_GetMaxCharWidth(const XFontStruct* xfs, const XFONTTRANS *XFT) { unsigned min = (unsigned char)xfs->min_char_or_byte2; unsigned max = (unsigned char)xfs->max_char_or_byte2; - int maxwidth, j; + unsigned int maxwidth, j; if(!XFT || !xfs->per_char) return abs(xfs->max_bounds.width); @@ -3424,7 +3424,7 @@ BOOL X11DRV_GetCharWidth( X11DRV_PDEVICE *physDev, UINT firstChar, UINT lastChar if( pfo ) { - int i; + unsigned int i; if (pfo->fs->per_char == NULL) for (i = firstChar; i <= lastChar; i++) diff --git a/dlls/x11drv/xim.c b/dlls/x11drv/xim.c index 6dbc43e727c..7945fd72990 100644 --- a/dlls/x11drv/xim.c +++ b/dlls/x11drv/xim.c @@ -102,9 +102,9 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset, DWORD selLength, LPWSTR lpComp, DWORD dwCompLen) { /* Composition strings are edited in chunks */ - int byte_length = dwCompLen * sizeof(WCHAR); - int byte_offset = dwOffset * sizeof(WCHAR); - int byte_selection = selLength * sizeof(WCHAR); + unsigned int byte_length = dwCompLen * sizeof(WCHAR); + unsigned int byte_offset = dwOffset * sizeof(WCHAR); + unsigned int byte_selection = selLength * sizeof(WCHAR); BOOL rc = FALSE; TRACE("( %li, %li, %ld, %p, %ld):\n", dwOffset, selLength, dwIndex, lpComp, @@ -112,7 +112,7 @@ static BOOL X11DRV_ImmSetInternalString(DWORD dwIndex, DWORD dwOffset, if (dwIndex == GCS_COMPSTR) { - int i,j; + unsigned int i,j; LPBYTE ptr_new; LPBYTE ptr_old; diff --git a/dlls/x11drv/xrandr.c b/dlls/x11drv/xrandr.c index f9bc41c637c..d2d37c196fa 100644 --- a/dlls/x11drv/xrandr.c +++ b/dlls/x11drv/xrandr.c @@ -126,7 +126,8 @@ static int XRandRErrorHandler(Display *dpy, XErrorEvent *event, void *arg) /* create the mode structures */ static void make_modes(void) { - int i, j; + unsigned int i; + int j; for (i=0; i