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>
This commit is contained in:
parent
f7a97a7ab0
commit
4e53612347
|
@ -273,7 +273,7 @@ test_convert_XIRawEvent(void)
|
||||||
static void
|
static void
|
||||||
test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap)
|
test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap)
|
||||||
{
|
{
|
||||||
int buttons, valuators;
|
int valuators;
|
||||||
int i;
|
int i;
|
||||||
unsigned char *ptr;
|
unsigned char *ptr;
|
||||||
uint32_t flagmask = 0;
|
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_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));
|
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++) {
|
for (i = 0; i < bits_to_bytes(sizeof(in->buttons)); i++) {
|
||||||
if (XIMaskIsSet(in->buttons, i)) {
|
if (XIMaskIsSet(in->buttons, i)) {
|
||||||
assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i)));
|
assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i)));
|
||||||
buttons++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue