On Apr 12 2020, Tim Rühsen wrote:

> test-dl.c: In function 'test_fn_check':
> test-dl.c:186:9: warning: ISO C forbids conversion of object pointer to
> function pointer type [-Wpedantic]
>   186 |  fn_p = (test_fn)fn;
>       |         ^
>
> Following the code, tt basically turns down to the question "How to
> convert dlsym() return value into a function pointer correctly".

POSIX requires this to work.  Since dlsym isn't part of ISO C, it
doesn't make sense to use -Wpendantic.

Andreas.

-- 
Andreas Schwab, SUSE Labs, [email protected]
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

Reply via email to