I've been using Code Warrior at work and have come upon something 
that is driving me nuts.  I'm getting a Compiler warning for 
something that is perfectly acceptable.

The warning i get is for the FormType *frmP line, is... 

"Warning: variable 'frmP'is not initialized before being used"

It is used in the code below.

static Boolean MainFormHandleEvent(EventType * eventP)
{
        Boolean handled = false;
        FormType * frmP;        // this produces a warning
    ControlPtr ctlP;

    switch (eventP->eType) {
        // switch code deleted for brevity but I have removed it
        // completely and still get the warning
        }
        return true;
}

I have stripped everything out of this function except the 
declaration and still get the warning.  I don't get it on the About 
form handler or another form I have.  What causes this type of 
warning for this declaration that is put there by the wizzards?

Thanks,

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

Reply via email to