wrote:
> I compiles a program in SLOS, but there is a warning i donot know how
> to remove?
>
You don't have to post three times!
> here is the framework of the code:
> typedef struct device_tree
> {
> ......
>
> union
> {
> INT8U (*byte)(UID id); //read a byte from a particular device
> INT8U (*bit)(UID id); //read a bit from a particular device
> INT8U (*block)(UID id, block_data_t *block_w); //read a block
> from a particular device
> INT8U (*blockext)(UID id, block_data_t *block_w, unsigned long
> addr, unsigned long length);
> // read a block from flash or cf card
> } read;
> } device_tree_t;
>
> device_tree_t devices[] =
> {
> {
> /* device driver for serial ports */
> "SERIO",
> DEVICE_SERIO,
> serio_init,
> serio_open,
> serio_close,
> {outbyte},
> {inbyte}, //*************this is warning line
> *************************
Where is inbyte declared?
> isdataready,
> INT8U inbyte(UID id, block_data_t *block_w)
> {
> //do something
> }
>
This signature doesn't match the first item in the enum (the only one
you can initialise).
--
Ian Collins.