Mesa (master): i965: Fix printf format warnings on 32-bit builds.

Vinson Lee vlee at kemper.freedesktop.org
Wed Aug 25 01:52:17 UTC 2010


Module: Mesa
Branch: master
Commit: e96b3110373e8f15c3ba1de5ab561c9885e0003b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e96b3110373e8f15c3ba1de5ab561c9885e0003b

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Aug 24 18:51:56 2010 -0700

i965: Fix printf format warnings on 32-bit builds.

---

 src/mesa/drivers/dri/i965/brw_wm_debug.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_debug.c b/src/mesa/drivers/dri/i965/brw_wm_debug.c
index 191670d..6a91251 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_debug.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_debug.c
@@ -44,16 +44,16 @@ void brw_wm_print_value( struct brw_wm_compile *c,
       printf("undef");
    else if( value - c->vreg >= 0 &&
 	    value - c->vreg < BRW_WM_MAX_VREG)
-      printf("r%ld", value - c->vreg);
+      printf("r%ld", (long) (value - c->vreg));
    else if (value - c->creg >= 0 &&
 	    value - c->creg < BRW_WM_MAX_PARAM)
-      printf("c%ld", value - c->creg);
+      printf("c%ld", (long) (value - c->creg));
    else if (value - c->payload.input_interp >= 0 &&
 	    value - c->payload.input_interp < FRAG_ATTRIB_MAX)
-      printf("i%ld", value - c->payload.input_interp);
+      printf("i%ld", (long) (value - c->payload.input_interp));
    else if (value - c->payload.depth >= 0 &&
 	    value - c->payload.depth < FRAG_ATTRIB_MAX)
-      printf("d%ld", value - c->payload.depth);
+      printf("d%ld", (long) (value - c->payload.depth));
    else 
       printf("?");
 }




More information about the mesa-commit mailing list