• 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: Mysterious warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mysterious warning


  • Subject: Re: Mysterious warning
  • From: Graham Cox <email@hidden>
  • Date: Thu, 13 Nov 2008 17:26:37 +1100


On 13 Nov 2008, at 4:46 pm, Daniel Hyde wrote:

In the process of writing this email I've noticed that wptr is
initialised to NULL.  Is there any case where that line might be
reached without changing wptr's value first?  It might be warning you
that you're possibly going to decrement a NULL pointer.  -1 is rarely
going to be a valid memory address...


No, there's a great deal of code between the two points, including initialising wptr to a valid C string.

Both you and Michael Ash point out that the warning is probably erroneous, and now I understand what it's trying to tell me, I agree - there's no real problem here, which is good, as I've used this code without any problem for well over a decade in several projects.


thanks,

Graham
_______________________________________________

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


References: 
 >Mysterious warning (From: Graham Cox <email@hidden>)
 >Re: Mysterious warning (From: "Chris Suter" <email@hidden>)

  • Prev by Date: Re: Setting up a main menu in a NIB(XIB)?
  • Next by Date: Re: Weird bug in IB...
  • Previous by thread: Re: Mysterious warning
  • Next by thread: NSImage in NSAttributedString
  • Index(es):
    • Date
    • Thread