Re: How to get rid of Warning
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