I believe what I am looking for is referred to as forecasting...
I want to typedef a Function Pointer that refers to a struct, and then that Function pointer is stored in the struct. See ShellCmdDEF below.
typedef BOOL (*ShellCmdFN) (struct ShellCmdDEF* pCmd, uint16_t u16State);
typedef struct
{
uint32_t u32Flags;
uint16_t u16State;
ShellCmdFN pCmdFN;
} ShellCmdDEF;
The compiler complains thusly...
Shell.h:57:71: warning: 'struct ShellCmdDEF' declared inside parameter list [enabled by default] Shell.h:57:71: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
Of course the code works, and I have done this for years, but now it's for Misra/DO170B compliance and I need to get rid of the warnings.