I have a void pointer returned by dlsym(), I want to call the function pointed by the void pointer. So I do a type conversion by casting:
void *gptr = dlsym(
Note that C++11 allows such a conversion and from gcc 4.9 and above this conversion does not generate a warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57869.
See SO discussions: