The signature (type and number of arguments etc.) of the function pointer must match the signature of the function assigned to it. This example should make it clear ...
% type file.c struct { void(*function)(void *); } gs ; void works (void *); void gets_warning(void ); void try_stuff_out() { gs.function = works; gs.function = gets_warning; } % armcl -mv7A8 --verbose_diagnostics --display_error_number file.c "file.c", line 11: warning #515-D: a value of type "void (*)(void)" cannot be assigned to an entity of type "void (*)(void *)" gs.function = gets_warning; ^
Thanks and regards,
-George