Andrew Talbot : winex11.drv: Avoid signed-unsigned integer comparisons.
Alexandre Julliard
julliard at winehq.org
Wed Mar 6 13:11:53 CST 2013
Module: wine
Branch: master
Commit: 0ff8c9da524caea5ebdeb748398e6db3f9e0c100
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0ff8c9da524caea5ebdeb748398e6db3f9e0c100
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Tue Mar 5 22:52:11 2013 +0000
winex11.drv: Avoid signed-unsigned integer comparisons.
---
dlls/winex11.drv/mouse.c | 4 +++-
dlls/winex11.drv/window.c | 3 ++-
dlls/winex11.drv/xrender.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/mouse.c b/dlls/winex11.drv/mouse.c
index 790c532..de6672e 100644
--- a/dlls/winex11.drv/mouse.c
+++ b/dlls/winex11.drv/mouse.c
@@ -1220,8 +1220,10 @@ static Cursor create_xlib_color_cursor( HDC hdc, const ICONINFOEXW *icon, int wi
}
else /* invert the mask */
{
+ unsigned int j;
+
ptr = (unsigned int *)mask_bits;
- for (i = 0; i < info->bmiHeader.biSizeImage / sizeof(*ptr); i++, ptr++) *ptr ^= ~0u;
+ for (j = 0; j < info->bmiHeader.biSizeImage / sizeof(*ptr); j++, ptr++) *ptr ^= ~0u;
}
vis.depth = 1;
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 05cd75f..5fc978e 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -534,7 +534,8 @@ static BOOL create_icon_pixmaps( HDC hdc, const ICONINFO *icon, Pixmap *icon_ret
XVisualInfo vis = default_visual;
struct gdi_image_bits bits;
Pixmap color_pixmap = 0, mask_pixmap = 0;
- int i, lines;
+ int lines;
+ unsigned int i;
bits.ptr = NULL;
bits.free = NULL;
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 293e8e2..671f67a 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -763,7 +763,7 @@ static void lfsz_calc_hash(LFANDSIZE *plfsz)
{
DWORD hash = 0, *ptr, two_chars;
WORD *pwc;
- int i;
+ unsigned int i;
hash ^= plfsz->devsize.cx;
hash ^= plfsz->devsize.cy;
More information about the wine-cvs
mailing list