[trace] Avoid warnings from assigning a void pointer to a function pointer.

The Sun Studio compiler complains a *lot* when assigning the result
of dlsym to a function pointer.  Cast the result to the proper
type first.:w
This commit is contained in:
M Joonas Pihlaja 2009-09-13 13:09:47 +01:00
parent 19881012cb
commit fee5c58c6c

View file

@ -87,10 +87,10 @@ static void *_dlhandle = RTLD_NEXT;
#define DLCALL(name, args...) ({ \
static typeof (&name) name##_real; \
if (name##_real == NULL) { \
name##_real = dlsym (_dlhandle, #name); \
name##_real = (typeof (&name))(dlsym (_dlhandle, #name)); \
if (name##_real == NULL && _dlhandle == RTLD_NEXT) { \
_dlhandle = dlopen ("libcairo.so", RTLD_LAZY); \
name##_real = dlsym (_dlhandle, #name); \
name##_real = (typeof (&name))(dlsym (_dlhandle, #name)); \
assert (name##_real != NULL); \
} \
} \