Andrew Talbot : winex11.drv: Sign-compare warnings fix.

Alexandre Julliard julliard at winehq.org
Mon Dec 8 09:45:50 CST 2008


Module: wine
Branch: master
Commit: ff380900c283f2d820b8995eb7541d81aef426f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ff380900c283f2d820b8995eb7541d81aef426f1

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Sat Dec  6 13:18:43 2008 +0000

winex11.drv: Sign-compare warnings fix.

---

 dlls/winex11.drv/opengl.c |   13 ++++++-------
 dlls/winex11.drv/text.c   |    2 +-
 dlls/winex11.drv/xrandr.c |    9 ++++-----
 3 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index add9569..df5bae0 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -1892,8 +1892,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
 {
      /* We are running using client-side rendering fonts... */
      GLYPHMETRICS gm;
-     unsigned int glyph;
-     int size = 0;
+     unsigned int glyph, size = 0;
      void *bitmap = NULL, *gl_bitmap = NULL;
      int org_alignment;
 
@@ -1904,7 +1903,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
 
      for (glyph = first; glyph < first + count; glyph++) {
          unsigned int needed_size = GetGlyphOutline_ptr(hdc, glyph, GGO_BITMAP, &gm, 0, NULL, NULL);
-         int height, width_int;
+         unsigned int height, width_int;
 
          TRACE("Glyph : %3d / List : %d\n", glyph, listBase);
          if (needed_size == GDI_ERROR) {
@@ -1955,7 +1954,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
          if (needed_size != 0) {
              width_int = (gm.gmBlackBoxX + 31) / 32;
              for (height = 0; height < gm.gmBlackBoxY; height++) {
-                 int width;
+                 unsigned int width;
                  for (width = 0; width < width_int; width++) {
                      ((int *) gl_bitmap)[(gm.gmBlackBoxY - height - 1) * width_int + width] =
                      ((int *) bitmap)[height * width_int + width];
@@ -2603,10 +2602,10 @@ static GLboolean WINAPI X11DRV_wglChoosePixelFormatARB(HDC hdc, const int *piAtt
     int nAttribs = 0;
     GLXFBConfig* cfgs = NULL;
     int nCfgs = 0;
-    UINT it;
+    int it;
     int fmt_id;
     WineGLPixelFormat *fmt;
-    int pfmt_it = 0;
+    UINT pfmt_it = 0;
     int run;
 
     TRACE("(%p, %p, %p, %d, %p, %p): hackish\n", hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats);
@@ -2925,7 +2924,7 @@ static GLboolean WINAPI X11DRV_wglGetPixelFormatAttribfvARB(HDC hdc, int iPixelF
 {
     int *attr;
     int ret;
-    int i;
+    UINT i;
 
     TRACE("(%p, %d, %d, %d, %p, %p)\n", hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues);
 
diff --git a/dlls/winex11.drv/text.c b/dlls/winex11.drv/text.c
index 752b8d3..92a14f5 100644
--- a/dlls/winex11.drv/text.c
+++ b/dlls/winex11.drv/text.c
@@ -151,7 +151,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
     {
         /* have to render character by character. */
         double offset = 0.0;
-        int i;
+        UINT i;
 
         for (i=0; i<count; i++)
         {
diff --git a/dlls/winex11.drv/xrandr.c b/dlls/winex11.drv/xrandr.c
index fd930a2..fd21169 100644
--- a/dlls/winex11.drv/xrandr.c
+++ b/dlls/winex11.drv/xrandr.c
@@ -111,8 +111,8 @@ static int XRandRErrorHandler(Display *dpy, XErrorEvent *event, void *arg)
 /* create the mode structures */
 static void make_modes(void)
 {
-    unsigned int i;
-    int j;
+    int i, j;
+
     for (i=0; i<real_xrandr_sizes_count; i++)
     {
         if (real_xrandr_rates_count[i])
@@ -240,8 +240,7 @@ static LONG X11DRV_XRandR_SetCurrentMode(int mode)
 void X11DRV_XRandR_Init(void)
 {
     Bool ok;
-    int nmodes = 0;
-    unsigned int i;
+    int i, nmodes = 0;
 
     if (xrandr_major) return; /* already initialized? */
     if (!usexrandr) return; /* disabled in config */
@@ -272,7 +271,7 @@ void X11DRV_XRandR_Init(void)
         for (i=0; i < real_xrandr_sizes_count; i++)
         {
             real_xrandr_rates[i] = pXRRRates (gdi_display, DefaultScreen(gdi_display), i, &(real_xrandr_rates_count[i]));
-	    TRACE("- at %u: %dx%d (%d rates):", i, real_xrandr_sizes[i].width, real_xrandr_sizes[i].height, real_xrandr_rates_count[i]);
+	    TRACE("- at %d: %dx%d (%d rates):", i, real_xrandr_sizes[i].width, real_xrandr_sizes[i].height, real_xrandr_rates_count[i]);
             if (real_xrandr_rates_count[i])
             {
                 int j;




More information about the wine-cvs mailing list