From 52e86f4b2a743965a31dd0926256e28c530e506a Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 6 Feb 2019 15:35:08 +1000 Subject: [PATCH] test: force the litest feature enum to be 8 bytes or more We've used up all bits, so let's extend the enum. (1 << 31) triggers an assertion because we check for > LITEST_DEVICELESS. So we can't use that bit without other changes. Signed-off-by: Peter Hutterer --- test/litest.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/litest.h b/test/litest.h index e21ef3d2..0074c869 100644 --- a/test/litest.h +++ b/test/litest.h @@ -314,8 +314,12 @@ enum litest_device_feature { LITEST_NO_DEBOUNCE = bit(28), LITEST_TOOL_MOUSE = bit(29), LITEST_DIRECT = bit(30), + + _LITEST_DEVICE_FEATURE__FORCE_SIZE = LONG_MAX, }; +static_assert(sizeof(enum litest_device_feature) >= 8, "enum size expected to be 8"); + /* this is a semi-mt device, so we keep track of the touches that the tests * send and modify them so that the first touch is always slot 0 and sends * the top-left of the bounding box, the second is always slot 1 and sends