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 7a251ac..d16b153 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 b5c3f58..783bbc2 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 5979e23..53ebc17 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 b0aed89..577d071 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 2f362f9..19213b7 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 82ad14c..d60d629 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 aaafe84..2af3854 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 d2bf9d0..6012d3e 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;
       }