Unnecessary Boolean Warning
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