how to remove warning: initialization from incompatible pointer type?

Discussion in 'C Programming' started by wanglei0214@gmail.com, Jul 26, 2006.

  1. Guest

    I compiles a program in SLOS, but there is a warning i donot know how
    to remove?

    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
    *************************
    isdataready,
    0
    },

    {
    "\0",
    0,
    0,
    0,
    0,
    {0},
    {0},
    0,
    0
    }
    };

    INT8U inbyte(UID id, block_data_t *block_w)
    {
    //do something
    }
    , Jul 26, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brian Stubblefield

    initialization from incompatible pointer type

    Brian Stubblefield, May 25, 2004, in forum: C Programming
    Replies:
    3
    Views:
    15,215
    Brian Stubblefield
    May 27, 2004
  2. Michael

    incompatible pointer type warning ?

    Michael, Jun 5, 2006, in forum: C Programming
    Replies:
    8
    Views:
    514
    Ian Collins
    Jun 5, 2006
  3. Replies:
    2
    Views:
    1,142
    Ian Collins
    Jul 26, 2006
  4. Replies:
    1
    Views:
    492
    Andrew Poelstra
    Jul 26, 2006
  5. PraZ
    Replies:
    6
    Views:
    843
    Gernot Frisch
    Mar 30, 2006
Loading...

Share This Page