Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/22/04 08:12
Read: times


 
#63113 - Function pointer and call tree in Keil
Hi,

I am currentlt programming a user menu system which employ struct like this:

typedef void (code * VFPU) (uint8 key);

typedef struct _TMenu
{
sint8 * pTitle;
struct _TMenu * pNextMenu;
VFPU pMenuFunc;
} TMenu;


Each menu actually is an array of TMenu struct, such as following table:

(File name: menu_display.c)
TMenu code display_menu[]=
{
"Display menu:", main_menu, (VFPU)0,
"Reads", display_read_menu, ShowCurrRead,
"Units", display_unit_menu, ShowCurrUnit,
"", (TMenu *)0, (VFPU)0,
};

There is a function (I call it "search engine") which processes menus by displaying its string,execute menu function and jump to next menu.

When I compile, I get following warning
The compiler generates
*** WARNING L13: RECURSIVE CALL TO FUNCTION
CALLED: ?CO?MENU_DISPLAY
CALLER: _SHOWCURRREAD/MENU_DISPLAY

But, I don't know how to resolve it, I have reviewed Keil's knowledge base and related article, still not understand. This warning is much likely the source
of my program's unexpected behave - call tree crashed!

Is anyone can help me out ? my thanks in advance

Kind regards

Daniel



List of 4 messages in thread
TopicAuthorDate
Function pointer and call tree in Keil            01/01/70 00:00      
   RE: Function pointer and call tree in Keil            01/01/70 00:00      
      RE: Function pointer and call tree in Keil            01/01/70 00:00      
   RE: Function pointer and call tree in Keil            01/01/70 00:00      

Back to Subject List