• 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
  • Resent-date: Sun, 31 Jul 2011 15:37:34 -0500
  • Resent-from: Gordon Apple <email@hidden>
  • Resent-message-id: <CA5B21A9.4C9C8%email@hidden>
  • Resent-to: Developer Mailing Lists <email@hidden>
  • Thread-topic: Unnecessary Boolean Warning

Title: 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]);

 _______________________________________________
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: Unnecessary Boolean Warning
      • From: Marco S Hyman <email@hidden>
  • Prev by Date: Re: Treating some compiler warnings as errors, but not others?
  • Next by Date: Re: Xcode keeps altering my project.pbxproj files
  • Previous by thread: Re: Treating some compiler warnings as errors, but not others?
  • Next by thread: Re: Unnecessary Boolean Warning
  • Index(es):
    • Date
    • Thread