diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-03-20 20:00:37 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-03-22 00:33:29 +0000 |
commit | 4e53612347613a930bcd43d67fd9fe49f07ee4c2 (patch) | |
tree | d8dfafffc11b87e8ce5fbae5cfa9ab12ce673f9e | |
parent | f7a97a7ab0d196c9a771107f57cb550d9eec7233 (diff) |
test: xi2: drop unused variable
fix warning:
> ../test/xi2/protocol-eventconvert.c:276:9: warning: variable 'buttons' set but not used [-Wunused-but-set-variable]
> int buttons, valuators;
> ^
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1429>
-rw-r--r-- | test/xi2/protocol-eventconvert.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c index eb34f5b42..fb0627bb5 100644 --- a/test/xi2/protocol-eventconvert.c +++ b/test/xi2/protocol-eventconvert.c @@ -273,7 +273,7 @@ test_convert_XIRawEvent(void) static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap) { - int buttons, valuators; + int valuators; int i; unsigned char *ptr; uint32_t flagmask = 0; @@ -347,11 +347,9 @@ test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap) assert(out->root_x == double_to_fp1616(in->root_x + in->root_x_frac)); assert(out->root_y == double_to_fp1616(in->root_y + in->root_y_frac)); - buttons = 0; for (i = 0; i < bits_to_bytes(sizeof(in->buttons)); i++) { if (XIMaskIsSet(in->buttons, i)) { assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i))); - buttons++; } } |