]> git.ipfire.org Git - thirdparty/glibc.git/commit
mlock, mlock2, munlock: Tell the compiler we don't dereference the pointer
authorXi Ruoyao <xry111@xry111.site>
Thu, 26 Dec 2024 04:51:18 +0000 (12:51 +0800)
committerAndreas K. Hüttel <dilfridge@gentoo.org>
Wed, 1 Jan 2025 15:08:36 +0000 (16:08 +0100)
commit013106ae677af9836614ace1a01d25b63fa555a7
tree7fae500dffb55324e8251978cccaa3d5a961a825
parent58272284b633e5fd17293abdc55d56e546a1b02a
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>
misc/sys/mman.h
sysdeps/unix/sysv/linux/bits/mman-shared.h