This fixes the undefined behavior which GCC warns about. as casting a void * to a function pointer is undefined in C99:
Writing: cosine = (double ()(double)) dlsym(handle, "cos");
would seem more natural, but the C99 standard leaves
casting from "void " to a function pointer undefined.
The assignment used below is the POSIX.1-2003 (Technical
Corrigendum 1) workaround; see the Rationale for the
POSIX specification of dlsym().
This fixes the undefined behavior which GCC warns about. as casting a void * to a function pointer is undefined in C99:
source: man 3 dlsym