From 9636c88262fc5704cb4136cae975932acee6d08f Mon Sep 17 00:00:00 2001 From: Jussi Kivilinna Date: Sat, 16 Jul 2022 17:58:08 +0300 Subject: hwf-x86: fix UBSAN warning * src/hwf-x86.c (detect_x86_gnuc): Change `(1 << 31)` to `(1U << 31)` to fix undefined behaviour. -- Signed-off-by: Jussi Kivilinna --- src/hwf-x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/hwf-x86.c b/src/hwf-x86.c index 20420798..b440827e 100644 --- a/src/hwf-x86.c +++ b/src/hwf-x86.c @@ -431,7 +431,7 @@ detect_x86_gnuc (void) && (features & (1 << 21)) && (features & (1 << 28)) && (features & (1 << 30)) - && (features & (1 << 31)) + && (features & (1U << 31)) && (features2 & (1 << 1)) && (features2 & (1 << 6)) && (features2 & (1 << 11)) -- cgit v1.2.1