Add BIONIC_COMPLICATED_NULLNESS as _Null_unspecified
In some cases, the nullability of the pointer argument is too
complicated. Developers have better check relevant manuals or
code before annotating.
Bugs: b/245972273
Test: None
Change-Id: I3589a5080b267d1766cc8ed99868129ac16e4012
diff --git a/libc/include/fcntl.h b/libc/include/fcntl.h
index 4ef894b..1ec932b 100644
--- a/libc/include/fcntl.h
+++ b/libc/include/fcntl.h
@@ -149,7 +149,7 @@
*
* Available since API level 21.
*/
-ssize_t splice(int __in_fd, off64_t* _Null_unspecified __in_offset, int __out_fd, off64_t* _Null_unspecified __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
+ssize_t splice(int __in_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __in_offset, int __out_fd, off64_t* __BIONIC_COMPLICATED_NULLNESS __out_offset, size_t __length, unsigned int __flags) __INTRODUCED_IN(21);
/**
* [tee(2)](http://man7.org/linux/man-pages/man2/tee.2.html)
diff --git a/libc/include/regex.h b/libc/include/regex.h
index be1418e..be33819 100644
--- a/libc/include/regex.h
+++ b/libc/include/regex.h
@@ -49,8 +49,8 @@
typedef struct {
int re_magic;
size_t re_nsub; /* number of parenthesized subexpressions */
- const char * _Null_unspecified re_endp; /* end pointer for REG_PEND */
- struct re_guts * _Null_unspecified re_g; /* none of your business :-) */
+ const char * __BIONIC_COMPLICATED_NULLNESS re_endp; /* end pointer for REG_PEND */
+ struct re_guts * __BIONIC_COMPLICATED_NULLNESS re_g; /* none of your business :-) */
} regex_t;
typedef struct {
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 5b9d99b..484757e 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -63,6 +63,14 @@
#define __BIONIC_ALIGN(__value, __alignment) (((__value) + (__alignment)-1) & ~((__alignment)-1))
/*
+ * The nullness constraints of this parameter or return value are
+ * quite complex. This is used to highlight spots where developers
+ * are encouraged to read relevant manuals or code to understand
+ * the full picture of nullness for this pointer.
+ */
+#define __BIONIC_COMPLICATED_NULLNESS _Null_unspecified
+
+/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces