From 611069d07c14bf7ace7a75fa2bc9147db8ac097d Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 14 Nov 2025 16:25:52 +0100 Subject: Add __diagnose_if annotations --- include/stdlib.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index 38015d4..aeed102 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -39,6 +39,7 @@ extern "C" { /* FIXME clang */ #if (defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)) && !defined(__clang__) #undef realpath +__warning_if(__p == NULL, "'realpath' called with path set to `NULL`; did you invert the arguments?") _FORTIFY_FN(realpath) char *realpath(const char *__p, char *__r) { #ifndef PATH_MAX -- cgit v1.3