mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
mlock, mlock2, munlock: Tell the compiler we don't dereference the pointer
Since https://gcc.gnu.org/r11-959, the compiler emits -Wmaybe-uninitialized if a const pointer to an uninitialized buffer is passed. Tell the compiler we don't dereference the pointer to remove the false alarm. Link: https://gcc.gnu.org/PR118194 Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Sam James <sam@gentoo.org>
This commit is contained in:
committed by
Andreas K. Hüttel
parent
58272284b6
commit
013106ae67
@ -56,7 +56,8 @@ int memfd_create (const char *__name, unsigned int __flags) __THROW;
|
||||
|
||||
/* Lock pages from ADDR (inclusive) to ADDR + LENGTH (exclusive) into
|
||||
memory. FLAGS is a combination of the MLOCK_* flags above. */
|
||||
int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW;
|
||||
int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW
|
||||
__attr_access ((__none__, 1));
|
||||
|
||||
/* Allocate a new protection key, with the PKEY_DISABLE_* bits
|
||||
specified in ACCESS_RESTRICTIONS. The protection key mask for the
|
||||
|
Reference in New Issue
Block a user