Date: Fri, 20 Jan 2017 15:56:40 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312538 - head/sys/sys Message-ID: <201701201556.v0KFueQl006167@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri Jan 20 15:56:40 2017 New Revision: 312538 URL: https://svnweb.freebsd.org/changeset/base/312538 Log: Addition of clang nullability qualifiers. For consistency with the qualifiers added in r310977, define a new qualifier _Null_unspecified which is also defined in clang 3.7+. Add two new macros: __NULLABILITY_PRAGMA_PUSH __NULLABILITY_PRAGMA_POP These are for use in headers when we want avoid noisy warnings if some pointers are left without nullability annotations. These are added with way ahead of their first use to teach the GCC ports headers of their existance before their first use. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Jan 20 15:47:29 2017 (r312537) +++ head/sys/sys/cdefs.h Fri Jan 20 15:56:40 2017 (r312538) @@ -793,6 +793,13 @@ #if !(defined(__clang__) && __has_feature(nullability)) #define _Nonnull #define _Nullable +#define _Null_unspecified +#define __NULLABILITY_PRAGMA_PUSH +#define __NULLABILITY_PRAGMA_POP +#else +#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ + _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") +#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") #endif /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701201556.v0KFueQl006167>