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

Author: Tomas Carnecky <[email protected]>
Date:   Thu Feb 26 07:31:35 2009 +0100

Fix "cast to pointer from integer of different size"

The script generates code like:
   pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
which causes the above mentioned warning. Add parenthesis around the
whole expression to fix it.

Signed-off-by: Tomas Carnecky <[email protected]>

---

 src/mesa/glapi/glX_proto_recv.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/glapi/glX_proto_recv.py b/src/mesa/glapi/glX_proto_recv.py
index 923c195..f423c6d 100644
--- a/src/mesa/glapi/glX_proto_recv.py
+++ b/src/mesa/glapi/glX_proto_recv.py
@@ -277,7 +277,7 @@ class 
PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto):
                        if param.is_image():
                                offset = f.offset_of( param.name )
 
-                               print '%s    %s const %s = (%s) %s(pc + %s);' % 
(indent, type_string, param.name, type_string, cond, offset)
+                               print '%s    %s const %s = (%s) (%s(pc + %s));' 
% (indent, type_string, param.name, type_string, cond, offset)
                                
                                if param.depth:
                                        print '%s    __GLXpixel3DHeader * const 
hdr = (__GLXpixel3DHeader *)(pc);' % (indent)

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to