[PATCH] mlock, mlock2, munlock: Tell the compiler we don't derefernce the pointer

Xi Ruoyao xry111@xry111.site
Wed Jan 1 08:18:47 GMT 2025


On Mon, 2024-12-30 at 13:22 +0000, Sam James wrote:
> Xi Ruoyao <xry111@xry111.site> writes:
> 
> > 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.
> > 
> 
> Reviewed-by: Sam James <sam@gentoo.org>

I don't have the write access, so I need help to push at some proper
time point (not sure now or after 2.41 release).


-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Libc-alpha mailing list