Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Turning off 'enumeral mismatch' warnings?




I'm porting an app from CodeWarrior to Xcode. In this app I often do the following sort of thing:


OSStatus GetSomething(int* someParam)
    {
    OSStatus err = someParam ? noErr : paramErr;
    if (!err)
        {
        ... Something useful in here and maybe set err along the way
        }
    return err;
    }

However, anytime I do the 'err = someParam ? noErr : paramErr' portion I get one of the following warnings:

warning: enumeral mismatch in conditional expression: '<anonymous enum>' vs '<anonymous enum>'

What magic options do I need change to stop these?

FYI - This is in C++ code

Also, is there a big list of all the gcc error/warning messages somewhere that explains in more detail what each error is and how it might be fixed?

Matt Gough

Softchaos Limited
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.