[Mesa-dev] Mesa (master): glapi: Add API that can create a _glapi_table from a dlfcn handle
Brian Paul
brianp at vmware.com
Mon Jun 13 14:27:56 PDT 2011
On 06/13/2011 02:05 PM, Jeremy Huddleston wrote:
> Hi Brian,
>
> Does this get rid of your warnings? (you'll need to regenerate the glapi_gentable.c)
>
Getting a different warning now:
glapi_gentable.c: In function ‘_glapi_create_table_from_handle’:
glapi_gentable.c:54:24: warning: ISO C forbids assignment between
function point
er and ‘void *’
glapi_gentable.c:60:24: warning: ISO C forbids assignment between
function point
er and ‘void *’
glapi_gentable.c:66:25: warning: ISO C forbids assignment between
function point
er and ‘void *’
glapi_gentable.c:72:26: warning: ISO C forbids assignment between
function point
er and ‘void *’
glapi_gentable.c:78:28: warning: ISO C forbids assignment between
function point
I think you'll need to use a casting function along the lines of this
from gallium's u_pointer.h:
typedef void (*func_pointer)(void);
static INLINE func_pointer
pointer_to_func( void *p )
{
union {
void *p;
func_pointer f;
} pf;
pf.p = p;
return pf.f;
}
-Brian
More information about the mesa-dev
mailing list