1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

linux: Fix integer overflow warnings when including <sys/mount.h> [BZ #32708]

Using gcc -Wshift-overflow=2 -Wsystem-headers to compile a file
including <sys/mount.h> will cause a warning since 1 << 31 is undefined
behavior on platforms where int is 32-bits.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
This commit is contained in:
Collin Funk
2025-03-25 11:17:55 -04:00
committed by Carlos O'Donell
parent cd33535002
commit 3263675250

View File

@@ -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
};