• 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
Unnecessary Boolean Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unnecessary Boolean Warning


  • Subject: Unnecessary Boolean Warning
  • From: Gordon Apple <email@hidden>
  • Date: Sun, 31 Jul 2011 15:13:45 -0500
  • Thread-topic: Unnecessary Boolean Warning

The following expression generates a warning message (³&&² within ³||²) and
says to include the ³anded² expression in parens.  Anybody who understands
basic boolean operator precedence knows this is unnecessary.  Bug report?

    BOOL isInUse = [super mediaIsInUse];
    isInUse = isInUse || [self videoIsOn] && ([[self capMgr] isRecording]
                                              || [[self camVC]
movieIsPlaying]
                                              || [[self camVC]
movieIsPaused]);


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Unnecessary Boolean Warning
      • From: Graham Cox <email@hidden>
    • Re: Unnecessary Boolean Warning
      • From: Gordon Apple <email@hidden>
  • Prev by Date: Re: How to implement Autosaving, Browsing Versions, Reverting to Last Saved in Lion?
  • Next by Date: Re: Multithreaded Coredata save in Lion
  • Previous by thread: Re: Multithreaded Coredata save in Lion
  • Next by thread: Re: Unnecessary Boolean Warning
  • Index(es):
    • Date
    • Thread