Fixed Warning related to casting converting void pointer and function pointer

Assigning a void pointer to a function pointer is an undefined behaviour.
If more strict warnings are enabled and warnings are treated as errors, this can prevent the project from compiling.
Merge pull request #38 from iOSCowboy/master

Fixed Warning related to casting converting void pointer and function pointer