_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.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
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())