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