• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Turning off 'enumeral mismatch' warnings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Turning off 'enumeral mismatch' warnings?


  • Subject: Turning off 'enumeral mismatch' warnings?
  • From: Matt Gough <email@hidden>
  • Date: Tue, 9 May 2006 15:19:36 +0100


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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Turning off 'enumeral mismatch' warnings?
      • From: "James W. Walker" <email@hidden>
    • why: sClientMessageProc == nil CoreDockRegisterClient_AlreadyRegistered on startup?
      • From: tyler <email@hidden>
  • Prev by Date: Re: Carbon framework - Public headers
  • Next by Date: Run Script dependency
  • Previous by thread: Re: Bad path element warning in Java build transcript
  • Next by thread: why: sClientMessageProc == nil CoreDockRegisterClient_AlreadyRegistered on startup?
  • Index(es):
    • Date
    • Thread