• 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: How to get rid of Warning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get rid of Warning


  • Subject: Re: How to get rid of Warning
  • From: Wim Lewis <email@hidden>
  • Date: Wed, 15 Jun 2016 11:16:53 -0700

On Jun 15, 2016, at 7:21 AM, Dave <email@hidden> wrote:
> I’m getting the Warning - "Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)”
>
> On this definition:
>
> +(nullable NSString*) getIDStringWithError:(NSError**) theErrorPtr;
>
> I can’t figure out the syntax to specify that the NSError** pointer can be null?

IIRC, the compiler automatically assumes the annotations "NSError * __nullable __autoreleasing * __nullable" for things that look like out-error parameters (in C type notation, that means a pointer, which could be null, to an (NSError *), which itself not only can be null but which has autorelease semantics even in ARC mode: this is the convention for out-error parameters in Cocoa). Does it help if you specify that explicitly?



 _______________________________________________
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: 
 >How to get rid of Warning (From: Dave <email@hidden>)

  • Prev by Date: Re: How to get rid of Warning
  • Next by Date: Re: Xcode 8 (App extension for the Xcode source editor to enable developer plug-ins)
  • Previous by thread: Re: How to get rid of Warning
  • Next by thread: XCode Editor Weirdness
  • Index(es):
    • Date
    • Thread