From 590f5992b66a0f105eabf2eae35e8704cbf9a59e Mon Sep 17 00:00:00 2001 From: Steve Grubb Date: Thu, 10 Mar 2022 05:56:33 +0530 Subject: Add some missing access function attributes This patch adds some missing access function attributes to getrandom / getentropy and several functions in sys/xattr.h Reviewed-by: Siddhesh Poyarekar --- stdlib/sys/random.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'stdlib') diff --git a/stdlib/sys/random.h b/stdlib/sys/random.h index ea5b98d..8c2ef9c 100644 --- a/stdlib/sys/random.h +++ b/stdlib/sys/random.h @@ -32,11 +32,13 @@ __BEGIN_DECLS /* Write LENGTH bytes of randomness starting at BUFFER. Return the number of bytes written, or -1 on error. */ ssize_t getrandom (void *__buffer, size_t __length, - unsigned int __flags) __wur; + unsigned int __flags) __wur + __attr_access ((__write_only__, 1, 2)); /* Write LENGTH bytes of randomness starting at BUFFER. Return 0 on success or -1 on error. */ -int getentropy (void *__buffer, size_t __length) __wur; +int getentropy (void *__buffer, size_t __length) __wur + __attr_access ((__write_only__, 1, 2)); __END_DECLS -- cgit v1.1