• 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: Xcode incorrect 'uninitialized' warning?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode incorrect 'uninitialized' warning?


  • Subject: Re: Xcode incorrect 'uninitialized' warning?
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 07 Feb 2017 15:41:40 -0800

On Feb 7, 2017, at 14:46 , Carl Hoefs <email@hidden> wrote:

Is this saying the compiler has no introspection into the CPTImageSlices struct since it could have any combination of initialized/uninitialized elements?

My guess is that it’s the indexed struct element reference that prevents it from seeing your initialization, rather than the fact of the struct itself.

Run it through the static analyzer, and it will be able to show you the execution flow that (it thinks) is wrong.

Also, you can probably use a C struct initializer to make this go away, and be more efficient too. I dunno the exact syntax details, but something like:

 CPTImageSlices imageSlices = { 9 *  NULL };

give or take an extra set of braces in there somewhere.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Xcode incorrect 'uninitialized' warning?
      • From: Jens Alfke <email@hidden>
    • Re: Xcode incorrect 'uninitialized' warning?
      • From: Carl Hoefs <email@hidden>
References: 
 >Xcode incorrect 'uninitialized' warning? (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Xcode incorrect 'uninitialized' warning?
  • Next by Date: Re: Xcode incorrect 'uninitialized' warning?
  • Previous by thread: Xcode incorrect 'uninitialized' warning?
  • Next by thread: Re: Xcode incorrect 'uninitialized' warning?
  • Index(es):
    • Date
    • Thread