• 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: NSUInteger in for-loop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSUInteger in for-loop?


  • Subject: Re: NSUInteger in for-loop?
  • From: "Sean McBride" <email@hidden>
  • Date: Mon, 15 Sep 2008 12:34:43 -0400
  • Organization: Rogue Research

On 9/15/08 2:45 PM, Brett Powley said:

>Second problem (which you'll see if you change the NSLog):  counter is
>unsigned, so it *never* "turns negative".

And gcc can catch these kinds of things!

$ gcc-4.2 -framework Cocoa -std=c99 -Wall -Wextra ~/Desktop/test.m

/Users/sean/Desktop/test.m: In function 'main':
/Users/sean/Desktop/test.m:7: warning: comparison of unsigned expression
>= 0 is always true

Turn on those compiler warnings! :)

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: NSUInteger in for-loop?
      • From: Charles Srstka <email@hidden>
References: 
 >NSUInteger in for-loop? (From: Alex Reynolds <email@hidden>)
 >Re: NSUInteger in for-loop? (From: Brett Powley <email@hidden>)

  • Prev by Date: [SOLVED] Re: Newb: Targeting an instance of a class instantiated by a NIB file
  • Next by Date: Strange property behavior
  • Previous by thread: Re: NSUInteger in for-loop?
  • Next by thread: Re: NSUInteger in for-loop?
  • Index(es):
    • Date
    • Thread