• 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: Jens Alfke <email@hidden>
  • Date: Wed, 15 Jun 2016 10:49:29 -0700

> I’m getting the Warning - "Pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified)”

You probably added a “nullable” or “__nullable” attribute somewhere else in that header. If you do that, the compiler enables nullability and will then (by default) require _every_ pointer parameter to have a nullability attribute.

If you want to add nullability annotations in declarations, you should bracket the header with NS_ASSUME_NONNULL_BEGIN and NS_ASSUME_NONNULL_END. These are macros that will enable nullability but tell the compiler to assume _Nonnull if no attribute is given. These macros are used in all the Cocoa headers.

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

  • Prev by Date: Re: XCode Editor Weirdness
  • Next by Date: Re: How to get rid of Warning
  • Previous by thread: How to get rid of Warning
  • Next by thread: Re: How to get rid of Warning
  • Index(es):
    • Date
    • Thread