From 9ac5b2fc5ac13d317dd20f01322faa4d0d7c3143 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Mon, 11 Dec 2023 13:32:12 +0100 Subject: [PATCH] lib/attr.h: Add ATTR_ACCESS() This will replace the existing comments like /*@out@*/ Link: Cc: Serge Hallyn Signed-off-by: Alejandro Colomar --- lib/attr.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/attr.h b/lib/attr.h index b1f153c7e..8b0dd26ca 100644 --- a/lib/attr.h +++ b/lib/attr.h @@ -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__) -- 2.47.2