properly typecast the function pointers

This commit is contained in:
Joseph Poirier 2015-01-06 13:42:02 -06:00
commit 4e2192fd1c

View file

@ -30,9 +30,9 @@ int main(int argc, char* argv[])
occupiedMem = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"occupiedMem"); occupiedMem = (pFunc)GetProcessAddress((HMODULE) hndl, (char const*)"occupiedMem");
#else /* OSX || NIX */ #else /* OSX || NIX */
hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY); hndl = (void*) dlopen((char const*)"./libshared.so", RTLD_LAZY);
status = (void*) dlsym(hndl, (char const*)"status"); status = (pFunc) dlsym(hndl, (char const*)"status");
count = (void*) dlsym(hndl, (char const*)"count"); count = (pFunc) dlsym(hndl, (char const*)"count");
occupiedMem = (void*) dlsym(hndl, (char const*)"occupiedMem"); occupiedMem = (pFunc) dlsym(hndl, (char const*)"occupiedMem");
#endif #endif
assert(hndl); assert(hndl);