The compiler seems to ignore the attribute in a function pointer,
though.
Link: <https://splint.org/manual/manual.html#undefined>
Cc: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
#ifndef COMMONIO_H
#define COMMONIO_H
+
+#include "attr.h"
#include "defines.h" /* bool */
+
/*
* Linked list entry.
*/
* 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 *);
/*