Skip to content
Commit c13567bb authored by Jason Gerecke's avatar Jason Gerecke Committed by Peter Hutterer
Browse files

fallback: Fix ubsan runtime error



Running libinput-test-suite with -fsanitize=undefined highlights the two
following errors. Force C to realize we want an unsigned result by making
the '1' literal unsigned.

../src/evdev-fallback.c:314:22 runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
../src/evdev-fallback.c:377:24 runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

v2: use bit() instead of manual shift 1U<<1

Signed-off-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f589f496)
parent 0488af4b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment