Mesa (master): util: Fix ptr -> int conversion.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Thu May 13 20:14:43 UTC 2010


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu May 13 21:14:07 2010 +0100

util: Fix ptr -> int conversion.

---

 src/gallium/auxiliary/util/u_surfaces.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_surfaces.c b/src/gallium/auxiliary/util/u_surfaces.c
index 668da8c..b5d2157 100644
--- a/src/gallium/auxiliary/util/u_surfaces.c
+++ b/src/gallium/auxiliary/util/u_surfaces.c
@@ -28,7 +28,7 @@ util_surfaces_do_get(struct util_surfaces *us, unsigned surface_struct_size, str
    {	/* or 2D array */
       if(!us->u.table)
 	 us->u.table = util_hash_table_create(hash, compare);
-      key = (void *)(((zslice + face) << 8) | level);
+      key = (void *)(uintptr_t)(((zslice + face) << 8) | level);
       /* TODO: ouch, should have a get-reference function...
        * also, shouldn't allocate a two-pointer structure for each item... */
       ps = util_hash_table_get(us->u.table, key);




More information about the mesa-commit mailing list