Fix some warnings on x86_64
authorAlan Hourihane <alanh@tungstengraphics.com>
Fri, 7 Apr 2006 08:50:39 +0000 (08:50 +0000)
committerAlan Hourihane <alanh@tungstengraphics.com>
Fri, 7 Apr 2006 08:50:39 +0000 (08:50 +0000)
src/mesa/drivers/dri/i915/i830_context.c
src/mesa/drivers/dri/i915/i915_context.c
src/mesa/drivers/dri/i915/intel_batchbuffer.c
src/mesa/drivers/dri/i915/intel_batchbuffer.h
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i915/intel_ioctl.c
src/mesa/drivers/dri/i915/intel_pixel.c
src/mesa/drivers/dri/i915/intel_tex.c

index 7a251ac6e891144ebeb6d8054a3ac7446f3c3b8a..d16b153fac28bbd9e378ac41a79414831c244cfb 100644 (file)
@@ -84,7 +84,7 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis,
                            12,
                            I830_NR_TEX_REGIONS,
                            intel->sarea->texList,
-                           & intel->sarea->texAge,
+                           (unsigned *) & intel->sarea->texAge,
                            & intel->swapped,
                            sizeof( struct i830_texture_object ),
                            (destroy_texture_object_t *)intelDestroyTexObj );
index b5c3f58d4581bb782a8aaab94373ed2c4cc4a545..783bbc2ab897cff93a51f524fcf7193b0fa51da2 100644 (file)
@@ -127,7 +127,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
                            12,
                            I830_NR_TEX_REGIONS,
                            intel->sarea->texList,
-                           & intel->sarea->texAge,
+                           (unsigned *) & intel->sarea->texAge,
                            & intel->swapped,
                            sizeof( struct i915_texture_object ),
                            (destroy_texture_object_t *)intelDestroyTexObj );
index 5979e236bcd772cb5cd83ac4ce078af073b31501..53ebc17099d9887f85fbe70174f542183b5d0f52 100644 (file)
@@ -216,7 +216,7 @@ void intelStartInlinePrimitive( intelContextPtr intel, GLuint prim )
    }
 
 #if 1
-   if (((int)intel->batch.ptr) & 0x4) {
+   if (((unsigned long)intel->batch.ptr) & 0x4) {
       BEGIN_BATCH(1);
       OUT_BATCH(0);
       ADVANCE_BATCH();
index b0aed89af556124faaf334bcd14db9ed7fd23f11..577d07137ffe701a19ee0c41894bd8088c86c2dc 100644 (file)
@@ -43,8 +43,9 @@ extern int VERBOSE;
 #define BEGIN_BATCH(n)                                                 \
 do {                                                                   \
    if (VERBOSE) fprintf(stderr,                                        \
-                       "BEGIN_BATCH(%d) in %s, %d dwords free\n",      \
-                       (n), __FUNCTION__, intel->batch.space/4);       \
+                       "BEGIN_BATCH(%ld) in %s, %d dwords free\n",     \
+                       ((unsigned long)n), __FUNCTION__,               \
+                       intel->batch.space/4);                          \
    if (intel->batch.space < (n)*4)                                     \
       intelFlushBatch(intel, GL_TRUE);                                 \
    if (intel->batch.space == intel->batch.size)        intel->batch.func = __FUNCTION__;                       \
index 2f362f9c2fb3af3bbb689b08623de46805d8ab95..19213b7bc55c731b3ad66c66260b6fba3a6173b9 100644 (file)
@@ -207,7 +207,7 @@ struct intel_context
    GLenum render_primitive;
    GLenum reduced_primitive;
    GLuint vertex_size;
-   char *verts;                        /* points to tnl->clipspace.vertex_buf */
+   unsigned char *verts;          /* points to tnl->clipspace.vertex_buf */
 
 
    /* Fallback rasterization functions 
index 82ad14ca114cc9b91810b20b76cc9eacb01ec91e..d60d629afbda29793ad7164411d9a41c635ba29a 100644 (file)
@@ -140,7 +140,7 @@ void intelRefillBatchLocked( intelContextPtr intel, GLboolean allow_unlock )
       fprintf(stderr, "%s: now using half %d\n", __FUNCTION__, buf);
 
    intel->batch.start_offset = intel->alloc.offset + buf * half;
-   intel->batch.ptr = (char *)intel->alloc.ptr + buf * half;
+   intel->batch.ptr = (unsigned char *)intel->alloc.ptr + buf * half;
    intel->batch.size = half - 8;
    intel->batch.space = half - 8;
    assert(intel->batch.space >= 0);
index aaafe84a6a00c2012433ff8cbc134a1c8890bc22..2af38541d9ca7b0a2683a63c935e6624b8c8644c 100644 (file)
@@ -157,13 +157,15 @@ intersect_region(const drm_clip_rect_t *box,
    if (by < y) bh -= y - by, by = y;
    if (bx + bw > x + width) bw = x + width - bx;
    if (by + bh > y + height) bh = y + height - by;
-   if (bw <= 0) return GL_FALSE;
-   if (bh <= 0) return GL_FALSE;
 
    *xOut = bx;
    *yOut = by;
    *wOut = bw;
    *hOut = bh;
+
+   if (bw <= 0) return GL_FALSE;
+   if (bh <= 0) return GL_FALSE;
+
    return GL_TRUE;
 }
 
@@ -423,6 +425,8 @@ intelTryDrawPixels( GLcontext *ctx,
    }
    else
       return GL_FALSE;
+
+   return GL_FALSE;
 }
 
 static void
index d2bf9d06c10e33ddadeff02ef2c702909985d1d8..6012d3e799919bbad80756faa83dda8dcb0e85ca 100644 (file)
@@ -787,7 +787,8 @@ int intelUploadTexImages( intelContextPtr intel,
         }
 
         /* Set the base offset of the texture image */
-        t->BufAddr = intel->intelScreen->tex.map + t->base.memBlock->ofs;
+        t->BufAddr = (GLubyte *) (intel->intelScreen->tex.map + 
+                                  t->base.memBlock->ofs);
         t->TextureOffset = intel->intelScreen->tex.offset + t->base.memBlock->ofs;
         t->dirty = ~0;
       }