C/C++ getvect question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • su817200
    New Member
    • Apr 2010
    • 13

    C/C++ getvect question

    Dear Friend,
    I got the following warning message during compilation. Could you please help.

    void *PC_VectGet (INT8U vect)
    {
    return (getvect(vect)) ; /*warning 14*/
    }

    Warnings->

    ..\..\..\..\Mic roC_OS-II\PC.C(433) : warning 14: 'return' : 'void *' differs in levels of indirection from 'int'

    Rgds,
  • newb16
    Contributor
    • Jul 2008
    • 687

    #2
    getvect is most likely declared like
    int getvect(int),
    returning int. Whent you return its return value in PC_VectGet, it's cast to void*. If you want it to be cast, you may add explicit cast, like
    return (void*)(getvect (vect)); If you are not sure, you most likely are doing it wrong.

    Comment

    Working...