Nullability check for error module

Bugs: b/245972273
Test: adb shell
Change-Id: I9d1c20cf2a7e1e4201c3c54a321c9d9f896c92e2
diff --git a/libc/include/err.h b/libc/include/err.h
index e91dac9..af44514 100644
--- a/libc/include/err.h
+++ b/libc/include/err.h
@@ -50,7 +50,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-__noreturn void err(int __status, const char* __fmt, ...) __printflike(2, 3);
+__noreturn void err(int __status, const char* _Nullable __fmt, ...) __printflike(2, 3);
 
 /**
  * [verr(3)](http://man7.org/linux/man-pages/man3/verr.3.html) outputs the program name,
@@ -60,7 +60,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-__noreturn void verr(int __status, const char* __fmt, va_list __args) __printflike(2, 0);
+__noreturn void verr(int __status, const char* _Nullable __fmt, va_list __args) __printflike(2, 0);
 
 /**
  * [errx(3)](http://man7.org/linux/man-pages/man3/errx.3.html) outputs the program name, and
@@ -70,7 +70,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-__noreturn void errx(int __status, const char* __fmt, ...) __printflike(2, 3);
+__noreturn void errx(int __status, const char* _Nullable __fmt, ...) __printflike(2, 3);
 
 /**
  * [verrx(3)](http://man7.org/linux/man-pages/man3/err.3.html) outputs the program name, and
@@ -80,7 +80,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-__noreturn void verrx(int __status, const char* __fmt, va_list __args) __printflike(2, 0);
+__noreturn void verrx(int __status, const char* _Nullable __fmt, va_list __args) __printflike(2, 0);
 
 /**
  * [warn(3)](http://man7.org/linux/man-pages/man3/warn.3.html) outputs the program name,
@@ -88,7 +88,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-void warn(const char* __fmt, ...) __printflike(1, 2);
+void warn(const char* _Nullable __fmt, ...) __printflike(1, 2);
 
 /**
  * [vwarn(3)](http://man7.org/linux/man-pages/man3/vwarn.3.html) outputs the program name,
@@ -96,7 +96,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-void vwarn(const char* __fmt, va_list __args) __printflike(1, 0);
+void vwarn(const char* _Nullable __fmt, va_list __args) __printflike(1, 0);
 
 /**
  * [warnx(3)](http://man7.org/linux/man-pages/man3/warnx.3.html) outputs the program name, and
@@ -104,7 +104,7 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-void warnx(const char* __fmt, ...) __printflike(1, 2);
+void warnx(const char* _Nullable __fmt, ...) __printflike(1, 2);
 
 /**
  * [vwarnx(3)](http://man7.org/linux/man-pages/man3/warn.3.html) outputs the program name, and
@@ -112,6 +112,6 @@
  *
  * New code should consider error() in `<error.h>`.
  */
-void vwarnx(const char* __fmt, va_list __args) __printflike(1, 0);
+void vwarnx(const char* _Nullable __fmt, va_list __args) __printflike(1, 0);
 
 __END_DECLS
diff --git a/libc/include/errno.h b/libc/include/errno.h
index b6a4c7e..d481cfc 100644
--- a/libc/include/errno.h
+++ b/libc/include/errno.h
@@ -49,7 +49,7 @@
  *
  * @private
  */
-int* __errno(void) __attribute_const__;
+int* _Nonnull __errno(void) __attribute_const__;
 
 /**
  * [errno(3)](http://man7.org/linux/man-pages/man3/errno.3.html) is the last error on the calling
diff --git a/libc/include/error.h b/libc/include/error.h
index 036a831..187ee17 100644
--- a/libc/include/error.h
+++ b/libc/include/error.h
@@ -44,7 +44,7 @@
  *
  * Available since API level 23.
  */
-extern void (*error_print_progname)(void) __INTRODUCED_IN(23);
+extern void (* _Nullable error_print_progname)(void) __INTRODUCED_IN(23);
 
 /**
  * [error_message_count(3)](http://man7.org/linux/man-pages/man3/error_message_count.3.html) is
@@ -70,7 +70,7 @@
  *
  * Available since API level 23.
  */
-void error(int __status, int __errno, const char* __fmt, ...) __printflike(3, 4) __INTRODUCED_IN(23);
+void error(int __status, int __errno, const char* _Nonnull __fmt, ...) __printflike(3, 4) __INTRODUCED_IN(23);
 
 /**
  * [error_at_line(3)](http://man7.org/linux/man-pages/man3/error_at_line.3.html) formats the given
@@ -80,6 +80,6 @@
  *
  * Available since API level 23.
  */
-void error_at_line(int __status, int __errno, const char* __filename, unsigned int __line_number, const char* __fmt, ...) __printflike(5, 6) __INTRODUCED_IN(23);
+void error_at_line(int __status, int __errno, const char* _Nonnull __filename, unsigned int __line_number, const char* _Nonnull __fmt, ...) __printflike(5, 6) __INTRODUCED_IN(23);
 
 __END_DECLS