Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I use function pointers to loop through state machines.
They are declared global as:
Following code is problematic:
// wait for transmission completed and start timeout then
transmit_ok = 0;
mdb_thread = &mdb_watch_after_transmit();
// wait for timeout or reception of data
if( timeout() )
main_thread = &reset();
mdb_thread = &mdb_watch_transmit(); // famous line 79 from the error
The function prototypes exist in a header file included in the c file.
mdb_rs232.c:79: error 47: indirections to different types assignment
from type 'void near* '
to type 'void function ( ) code* '
make: *** [mdb_rs232.rel] Error 1
In the first function he doesn't complain but in the second he does :s
As far as i can see i do nothing different, just passing the adres of a
function to it and both functions are the same type (void/void) so i can't
see whats the problem.
The function pointers are executed in a while 1 loop in the main function in
another file, there are those pointers prototyped but with the extern
keyword since i declare them in this file where the functions are written.