mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-28 15:20:30 +01:00
[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:
parent
19881012cb
commit
fee5c58c6c
1 changed files with 2 additions and 2 deletions
|
|
@ -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); \
|
||||
} \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue