• 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
views.267 may be used unitialized in this function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

views.267 may be used unitialized in this function


  • Subject: views.267 may be used unitialized in this function
  • From: Roland King <email@hidden>
  • Date: Tue, 18 May 2010 21:13:12 +0800

I'm getting the following two warnings only in release builds of my project

ObjectStackView.m:307: warning: 'views.267' may be used uninitialized in this function
ObjectStackView.m:307: warning: 'views.265' may be used uninitialized in this function

on the following line of code

for( ObjectView *objectView in ( onTop ? [ views objectEnumerator ] : [ views reverseObjectEnumerator ] ) )


onTop is a BOOL, views is an NSArray. I'm assuming that views.265 and views.267 are the two enumerator expressions. 

onTop doesn't change for different iterations but even if it did, as far as I understand it the _expression_ is evaluated once at the start of the loop so no issue there. 

I can get rid of the warning by moving the onTop ? .. : .. to a variable assignment on the line before and then using the variable but I don't see why I need to. 

This is gcc-4.2, XCode 3.2.2, compiling for iPhone so has to be gcc.  

Is there actually a problem with that line or is the compiler confused? 


 _______________________________________________
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

  • Prev by Date: Re: XCode 3.2.2 issues.
  • Next by Date: Question about Active Architecture setting
  • Previous by thread: Re: XCode 3.2.2 issues.
  • Next by thread: Question about Active Architecture setting
  • Index(es):
    • Date
    • Thread