void TestFunction() returns void.
void * temp_void(); is the wrong signature for TestFunction as the return type here is void*.
The correct return type would be void because that is exactly what TestFunction returns.
So your example should be:
#include <acknex.h>
void TestFunction()
{
error("TestFunction was called");
}
void CallFunc(void * func)
{
void temp_void();
temp_void = func;
if(temp_void) { temp_void(); }
}
void main()
{
CallFunc(TestFunction);
}