Fix signed/unsigned comparison warnings.
diff --git a/dlls/x11drv/clipboard.c b/dlls/x11drv/clipboard.c
index 9e2cf3e..3f7e262 100644
--- a/dlls/x11drv/clipboard.c
+++ b/dlls/x11drv/clipboard.c
@@ -275,7 +275,7 @@
*/
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_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 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 2072117..4015d3c 100644
--- a/dlls/x11drv/clipping.c
+++ b/dlls/x11drv/clipping.c
@@ -39,7 +39,7 @@
{
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 ac141d6..173a749 100644
--- a/dlls/x11drv/desktop.c
+++ b/dlls/x11drv/desktop.c
@@ -187,7 +187,7 @@
int X11DRV_desktop_GetCurrentMode(void)
{
- int i;
+ unsigned int i;
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;
for (i=0; i<dd_mode_count; i++)
diff --git a/dlls/x11drv/dib.c b/dlls/x11drv/dib.c
index 743bc10..be7a143 100644
--- a/dlls/x11drv/dib.c
+++ b/dlls/x11drv/dib.c
@@ -1240,7 +1240,8 @@
int left, int *colors,
XImage *bmpImage )
{
- int x = 0, y = lines - 1, c, length;
+ unsigned int x = 0;
+ int y = lines - 1, c, length;
const BYTE *begin = bits;
while (y >= 0)
@@ -1676,7 +1677,7 @@
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 @@
*/
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 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 f2d728a..98f7c96 100644
--- a/dlls/x11drv/event.c
+++ b/dlls/x11drv/event.c
@@ -580,7 +580,7 @@
*/
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 @@
if (TRACE_ON(clipboard))
{
- int i;
+ unsigned int i;
for ( i = 0; i < cTargets; i++)
{
if (targets[i])
@@ -752,7 +752,7 @@
*/
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 41f0d99..cd06e0b 100644
--- a/dlls/x11drv/graphics.c
+++ b/dlls/x11drv/graphics.c
@@ -989,7 +989,7 @@
{
if (X11DRV_SetupGCForBrush( physDev ))
{
- int i;
+ unsigned int i;
XRectangle *rect;
RGNDATA *data = X11DRV_GetRegionData( hrgn, physDev->hdc );
@@ -1123,7 +1123,8 @@
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 @@
{
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 85a292b..bb4bbc7 100644
--- a/dlls/x11drv/keyboard.c
+++ b/dlls/x11drv/keyboard.c
@@ -1214,8 +1214,8 @@
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 ce2e7d5..c9c1079 100644
--- a/dlls/x11drv/palette.c
+++ b/dlls/x11drv/palette.c
@@ -385,9 +385,10 @@
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 48e0159..dd78744 100644
--- a/dlls/x11drv/text.c
+++ b/dlls/x11drv/text.c
@@ -45,7 +45,7 @@
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 3d7e457..22961c3 100644
--- a/dlls/x11drv/x11ddraw.c
+++ b/dlls/x11drv/x11ddraw.c
@@ -432,7 +432,7 @@
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 2393d54..8215009 100644
--- a/dlls/x11drv/xfont.c
+++ b/dlls/x11drv/xfont.c
@@ -331,7 +331,7 @@
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 @@
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 @@
{
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 @@
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 6dbc43e..7945fd7 100644
--- a/dlls/x11drv/xim.c
+++ b/dlls/x11drv/xim.c
@@ -102,9 +102,9 @@
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 @@
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 f9bc41c..d2d37c1 100644
--- a/dlls/x11drv/xrandr.c
+++ b/dlls/x11drv/xrandr.c
@@ -126,7 +126,8 @@
/* create the mode structures */
static void make_modes(void)
{
- int i, j;
+ unsigned int i;
+ int j;
for (i=0; i<real_xrandr_sizes_count; i++)
{
if (real_xrandr_rates_count[i])
@@ -154,7 +155,7 @@
Window root;
XRRScreenConfiguration *sc;
short rate;
- int i;
+ unsigned int i;
int res = -1;
wine_tsx11_lock();
@@ -189,7 +190,8 @@
XRRScreenConfiguration *sc;
Status stat = RRSetConfigSuccess;
short rate;
- int i, j;
+ unsigned int i;
+ int j;
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;
@@ -243,7 +245,7 @@
{
Bool ok;
int nmodes = 0;
- int i;
+ unsigned int i;
if (xrandr_major) return; /* already initialized? */
if (!usexrandr) return; /* disabled in config */
diff --git a/dlls/x11drv/xrender.c b/dlls/x11drv/xrender.c
index 5fce5a7..2741175 100644
--- a/dlls/x11drv/xrender.c
+++ b/dlls/x11drv/xrender.c
@@ -521,7 +521,7 @@
*/
static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
{
- int buflen;
+ unsigned int buflen;
char *buf;
Glyph gid;
GLYPHMETRICS gm;
@@ -959,7 +959,7 @@
const INT *lpDx, INT breakExtra )
{
XRenderColor col;
- int idx;
+ unsigned int idx;
TEXTMETRICW tm;
RGNDATA *data;
SIZE sz;
@@ -1082,7 +1082,7 @@
TRACE("real x,y %d,%d\n", x, y);
if((char_extra = GetTextCharacterExtra(hdc)) != 0) {
- INT i;
+ UINT i;
SIZE tmpsz;
deltas = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT));
for(i = 0; i < count; i++) {
diff --git a/dlls/x11drv/xvidmode.c b/dlls/x11drv/xvidmode.c
index 13b48f7..8d8f777 100644
--- a/dlls/x11drv/xvidmode.c
+++ b/dlls/x11drv/xvidmode.c
@@ -95,7 +95,8 @@
int X11DRV_XF86VM_GetCurrentMode(void)
{
XF86VidModeModeLine line;
- int dotclock, i;
+ int dotclock;
+ unsigned int i;
DDHALMODEINFO cmode;
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;
@@ -143,7 +144,8 @@
void X11DRV_XF86VM_Init(void)
{
Bool ok;
- int nmodes, i;
+ int nmodes;
+ unsigned int i;
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;