]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/attr.h: Add ATTR_ACCESS()
authorAlejandro Colomar <alx@kernel.org>
Mon, 11 Dec 2023 12:32:12 +0000 (13:32 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 15 Jan 2024 19:14:28 +0000 (13:14 -0600)
This will replace the existing comments like /*@out@*/

Link: <https://splint.org/manual/manual.html#undefined>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/attr.h

index b1f153c7e42dcf7fa4eafdb9e55cde4c361730bf..8b0dd26caf6973874fe6859d738193c7c5425c2a 100644 (file)
@@ -9,10 +9,12 @@
 # define unused                      __attribute__((unused))
 # define NORETURN                    __attribute__((__noreturn__))
 # define format_attr(type, fmt, va)  __attribute__((format(type, fmt, va)))
+# define ATTR_ACCESS(...)            __attribute__((access(__VA_ARGS__)))
 #else
 # define unused
 # define NORETURN
 # define format_attr(type, fmt, va)
+# define ATTR_ACCESS(...)
 #endif
 
 #if (__GNUC__ >= 11) && !defined(__clang__)