From 7ce483e17cf14ee285a348d0f0081c89793d010b Mon Sep 17 00:00:00 2001 From: Manish V Badarkhe Date: Sun, 16 Feb 2025 23:05:07 +0000 Subject: [PATCH] fix(libc): remove __Nonnull type specifier Clang's nullability completeness checks were triggered after adding the _Nonnull specifier to one function. Removing it prevents Clang from flagging atexit() for missing a nullability specifier. include/lib/libc/stdlib.h:25:25: error: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Werror,-Wnullability-completeness] 25 | extern int atexit(void (*func)(void)); This change ensures compliance with the C standard while preventing unexpected build errors. Change-Id: I2f881c55b36b692d22c3db22149c6402c32e8c3e Signed-off-by: Manish V Badarkhe --- include/lib/libc/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/lib/libc/stdlib.h b/include/lib/libc/stdlib.h index cf30ef32a..71bb4ba4c 100644 --- a/include/lib/libc/stdlib.h +++ b/include/lib/libc/stdlib.h @@ -30,5 +30,5 @@ unsigned long strtoul(const char *nptr, char **endptr, int base); long long strtoll(const char *nptr, char **endptr, int base); unsigned long long strtoull(const char *nptr, char **endptr, int base); void qsort(void *, size_t, size_t, - int (* _Nonnull)(const void *, const void *)); + int (*)(const void *, const void *)); #endif /* STDLIB_H */