From: Collin Funk Date: Tue, 25 Mar 2025 15:17:55 +0000 (-0400) Subject: linux: Fix integer overflow warnings when including [BZ #32708] X-Git-Tag: glibc-2.42~356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3263675250cbcbbcc76ede4f7c660418bd345a11;p=thirdparty%2Fglibc.git linux: Fix integer overflow warnings when including [BZ #32708] Using gcc -Wshift-overflow=2 -Wsystem-headers to compile a file including will cause a warning since 1 << 31 is undefined behavior on platforms where int is 32-bits. Signed-off-by: Collin Funk Tested-by: Carlos O'Donell Reviewed-by: Carlos O'Donell --- diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h index 7c6d0805d7..b549e75148 100644 --- a/sysdeps/unix/sysv/linux/sys/mount.h +++ b/sysdeps/unix/sysv/linux/sys/mount.h @@ -121,7 +121,7 @@ enum MS_ACTIVE = 1 << 30, #define MS_ACTIVE MS_ACTIVE #undef MS_NOUSER - MS_NOUSER = 1 << 31 + MS_NOUSER = 1U << 31 #define MS_NOUSER MS_NOUSER };