• 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
Re: strange "warning: operation on '...' may be undefined"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strange "warning: operation on '...' may be undefined"


  • Subject: Re: strange "warning: operation on '...' may be undefined"
  • From: Wes Peterson <email@hidden>
  • Date: Sat, 20 May 2006 07:24:39 -1000

There is no guarantee which, count++ on the left, or count-1 on the right, will
be done first. That is C. --Wes
-----------------------------------------------
On May 20, 2006, at 7:04 AM, nick briggs wrote:


	Hello


I'm trying to fix all my compile warnings, this is my last one and its got me stumped:


	"warning: operation on 'count' may be undefined"

The strange thing is the warning is only generated on the line shown below, while I am performing ++count elsewhere without generating a warning.

	This is in a .m file


CGPoint sampledPoints[size*2];
int count = 0;
sampledPoints[count].x = 0.0;
sampledPoints[count].y = (float)((buffer[0]*_size)/ _scale)+h/2;
sampledPoints[++count].x = 1 * xstep;
sampledPoints[count].y = (float)((buffer[1]*_size)/ _scale)+h/2;
UInt32 i;
for (i = 1; i < size; i+=_resolution){


sampledPoints[++count].x = sampledPoints[count-1].x; <<<<-- warning here

sampledPoints[count].y = sampledPoints[count-1].y;
sampledPoints[++count].x = (float)xstep * i;
sampledPoints[count].y = (float)((buffer[i]*_size)/ _scale)+h/2;
}



Any help much appreciated

	Nick


_______________________________________________ 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

_______________________________________________
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


References: 
 >strange "warning: operation on '...' may be undefined" (From: nick briggs <email@hidden>)

  • Prev by Date: Re: strange "warning: operation on '...' may be undefined"
  • Next by Date: Universal build problem...
  • Previous by thread: Re: strange "warning: operation on '...' may be undefined"
  • Next by thread: Universal build problem...
  • Index(es):
    • Date
    • Thread