From: Alejandro Colomar Date: Mon, 11 Dec 2023 13:21:24 +0000 (+0100) Subject: lib/: Use ATTR_ACCESS() instead of /*@out@*/ X-Git-Tag: 4.15.0-rc1~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76e7de3fbb978f9c153eb422cd106a786cbc9d79;p=thirdparty%2Fshadow.git lib/: Use ATTR_ACCESS() instead of /*@out@*/ The compiler seems to ignore the attribute in a function pointer, though. Link: Cc: Serge Hallyn Signed-off-by: Alejandro Colomar --- diff --git a/lib/commonio.h b/lib/commonio.h index 7ea82d45e..7cd4f2031 100644 --- a/lib/commonio.h +++ b/lib/commonio.h @@ -11,8 +11,11 @@ #ifndef COMMONIO_H #define COMMONIO_H + +#include "attr.h" #include "defines.h" /* bool */ + /* * Linked list entry. */ @@ -61,7 +64,8 @@ struct commonio_ops { * fgets and fputs (can be replaced by versions that * understand line continuation conventions). */ - /*@null@*/char *(*fgets) (/*@returned@*/ /*@out@*/char *s, int n, FILE *stream); + ATTR_ACCESS(write_only, 1, 2) + /*@null@*/char *(*fgets)(/*@returned@*/char *s, int n, FILE *stream); int (*fputs) (const char *, FILE *); /*