[Mesa-dev] [PATCH 01/19] glx: Fix compile warnings since 99fee476a102be898a1a093c037e06382f90a5b9
Eric Anholt
eric at anholt.net
Tue Sep 25 19:49:59 PDT 2012
_glapi_table is a struct full of named function pointers, while the generated
code just wants to treat it as an array of function pointers. Cast to avoid
the compiler warning.
---
src/mapi/glapi/gen/glX_proto_send.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py
index 34aa2c3..0e4b420 100644
--- a/src/mapi/glapi/gen/glX_proto_send.py
+++ b/src/mapi/glapi/gen/glX_proto_send.py
@@ -423,7 +423,7 @@ __indirect_get_proc_address(const char *name)
print ''
print '#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)'
print ' if (gc->isDirect) {'
- print ' const _glapi_proc *const disp_table = GET_DISPATCH();'
+ print ' const _glapi_proc *const disp_table = (_glapi_proc *)GET_DISPATCH();'
print ' PFNGL%sPROC p =' % (name.upper())
print ' (PFNGL%sPROC) disp_table[%d];' % (name.upper(), func.offset)
print ' %sp(%s);' % (ret_string, func.get_called_parameter_string())
--
1.7.10.4
More information about the mesa-dev
mailing list