Commit 625a9651 authored by Mario Hlawitschka's avatar Mario Hlawitschka
Browse files

added documentation to the compiler warning about casting function pointers to void* and back

parent 9c365856
......@@ -208,6 +208,12 @@ struct WSharedLib::data
*/
func_ptr_type findFunction( const std::string& name )
{
// This cast is supposed to throw a warning because the cast
// of void* to function pointers is not defined or required
// in ISO C. Nevertheless, it works on most current compilers.
//
// man dlsym talks about introducing a new function to circumvent
// this problem.
return reinterpret_cast< func_ptr_type >( findVariable( name ) );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment