Commit 5f6f63a4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Fix signed/unsigned comparison warnings.

parent 06233cfb
......@@ -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 */
......
......@@ -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;
......
......@@ -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<dd_mode_count; i++)
......
......@@ -1240,7 +1240,8 @@ static void X11DRV_DIB_SetImageBits_RLE4( int lines, const BYTE *bits,
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 @@ 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;
......
......@@ -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 */
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
......@@ -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++)
......
......@@ -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;
......
......@@ -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<real_xrandr_sizes_count; i++)
{
if (real_xrandr_rates_count[i])
......@@ -154,7 +155,7 @@ static int X11DRV_XRandR_GetCurrentMode(void)
Window root;
XRRScreenConfiguration *sc;
short rate;
int i;
unsigned int i;
int res = -1;
wine_tsx11_lock();
......@@ -189,7 +190,8 @@ static void X11DRV_XRandR_SetCurrentMode(int mode)
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 @@ void X11DRV_XRandR_Init(void)
{
Bool ok;
int nmodes = 0;
int i;
unsigned int i;
if (xrandr_major) return; /* already initialized? */
if (!usexrandr) return; /* disabled in config */
......
......@@ -521,7 +521,7 @@ void X11DRV_XRender_UpdateDrawable(X11DRV_PDEVICE *physDev)
*/
static BOOL UploadGlyph(X11DRV_PDEVICE *physDev, int glyph)
{
int buflen;
unsigned int buflen;
char *buf;
Glyph gid;
GLYPHMETRICS gm;
......@@ -959,7 +959,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
const INT *lpDx, INT breakExtra )
{
XRenderColor col;
int idx;
unsigned int idx;
TEXTMETRICW tm;
RGNDATA *data;
SIZE sz;
......@@ -1082,7 +1082,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
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++) {
......
......@@ -95,7 +95,8 @@ static int XVidModeErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
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_SetCurrentMode(int mode)
void X11DRV_XF86VM_Init(void)
{
Bool ok;
int nmodes, i;
int nmodes;
unsigned int i;
DWORD dwBpp = screen_depth;
if (dwBpp == 24) dwBpp = 32;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment