Ok, I've been pulling my hair out all morning on this problem.  I've just
switched to CodeWarrior 8.0 and am wondering if this might be a quirk with
CW.
I have a very simple structure definition and function that uses the
pointer to the sturcture as a parameter.  But it won't compile.  I keep
getting "pointer/array required."  If I change MyIrEvt (just as a test) to
anything else that doesn't match the MyIrEvt within the function, it
compiles fine.  It is as though the MyIrEvt in the function is losing the
type.
I have tried changing the way the structure is defined using almost every
possible declaration variations and it doesn't work.
I have tried all forms of casting and nothing works.  I have left out most
of the code and just included the relevant definitions.  Anyone have a
clue what is going on here?
typedef struct _MyIrEvent{
        IrEvent IrEvt;
        UInt16 test;
} MyIrEvent;

MyIrEvent *MyIrEvt;  // I have also tried _MyIrEvent *MyIrEvt

static void DoIR(MyIRC, MyIrEvt) {
        switch(MyIrEvt->IrEvt) {    // this won't compile
                case LEVENT_DATA_IND:
                break;
        // more case stuff below
}

The error is "pointer/array required."  I have tried casting the MyIrEvt
within the switch statement back to the structure and it still gives the
error.  ???




-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to