Mesa (gallium-0.2): i915: Silence warnings

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Sun Nov 16 04:16:01 PST 2008


Module: Mesa
Branch: gallium-0.2
Commit: 96ad8a36003a21180ad6b61aa0b7d7c9452b3449
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=96ad8a36003a21180ad6b61aa0b7d7c9452b3449

Author: Jakob Bornecrantz <jakob at tungstengraphics.com>
Date:   Sun Nov 16 12:33:58 2008 +0100

i915: Silence warnings

---

 src/gallium/drivers/i915simple/i915_debug.c        |    5 +++++
 .../drivers/i915simple/i915_fpc_translate.c        |    2 +-
 src/gallium/drivers/i915simple/i915_texture.c      |    5 ++---
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/i915simple/i915_debug.c b/src/gallium/drivers/i915simple/i915_debug.c
index 5e26d1b..7a4e705 100644
--- a/src/gallium/drivers/i915simple/i915_debug.c
+++ b/src/gallium/drivers/i915simple/i915_debug.c
@@ -210,6 +210,7 @@ BITS(
    PRINTF(stream, ": 0x%x\n", ((dw) & himask) >> (lo));
 }
 
+#ifdef DEBUG
 #define MBZ( dw, hi, lo) do {							\
    unsigned x = (dw) >> (lo);				\
    unsigned lomask = (1 << (lo)) - 1;			\
@@ -217,6 +218,10 @@ BITS(
    himask = (1UL << (hi)) - 1;				\
    assert ((x & himask & ~lomask) == 0);	\
 } while (0)
+#else
+#define MBZ( dw, hi, lo) do {							\
+} while (0)
+#endif
 
 static void
 FLAG(
diff --git a/src/gallium/drivers/i915simple/i915_fpc_translate.c b/src/gallium/drivers/i915simple/i915_fpc_translate.c
index 34b4a84..43d62c5 100644
--- a/src/gallium/drivers/i915simple/i915_fpc_translate.c
+++ b/src/gallium/drivers/i915simple/i915_fpc_translate.c
@@ -144,7 +144,7 @@ src_vector(struct i915_fp_compile *p,
            const struct tgsi_full_src_register *source)
 {
    uint index = source->SrcRegister.Index;
-   uint src, sem_name, sem_ind;
+   uint src = 0, sem_name, sem_ind;
 
    switch (source->SrcRegister.File) {
    case TGSI_FILE_TEMPORARY:
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index bd87217..c65c064 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -206,11 +206,10 @@ i945_miptree_layout_2d( struct i915_texture *tex )
    unsigned nblocksx = pt->nblocksx[0];
    unsigned nblocksy = pt->nblocksy[0];
 
-#if 0 /* used for tiled display targets */
-   if (pt->last_level == 0 && pt->block.size == 4)
+   /* used for tiled display targets */
+   if (0)
       if (i915_displaytarget_layout(tex))
 	 return;
-#endif
 
    tex->stride = round_up(pt->nblocksx[0] * pt->block.size, 4);
 



More information about the mesa-commit mailing list