> -----Original Message----- > From: > [email protected] > [mailto:avr-gcc-list-bounces+eweddington=cso.atmel....@nongnu. > org] On Behalf Of Vincent Trouilliez > Sent: Saturday, January 24, 2009 6:12 PM > To: [email protected] > Subject: Re: [avr-gcc-list] A couple GCC warnings I would > like tounderstand/get rid of... > > On Sat, 24 Jan 2009 17:46:35 -0700 > "Weddington, Eric" <[email protected]> wrote: > > > Which means that you have the NULL and the &menu_sub > *reversed* according to your data structure layout, and then > on top of this your &menu_sub is the *wrong data*! The > structure is looking for a pointer to a function, and you are > giving it a pointer to another struct TMenu type. > > Oops, I guess I must have confused you somehow (my fault) but I don't > see how my pointers are reversed ? Or maybe my code is > unclear. If they > were reversed my program would not work anyhow, as it would try to > call a function (dumy_fnc) instead of displaying a submenu, and > vice-versa, calling a sub menu (menu_sub) when supposed to call the > dummy_fnc() function. >
Ah, ok, I see now. Sorry that I just gave it a quick glance. Again, typecasts are all that you need. See attached; no warnings, no errors.
menu.c
Description: menu.c
_______________________________________________ AVR-GCC-list mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
