mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-15 01:00:30 +01:00
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>
(cherry picked from commit 4e53612347)
This commit is contained in:
parent
88e0c1de76
commit
e4a5482c10
1 changed files with 1 additions and 3 deletions
|
|
@ -272,7 +272,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;
|
||||
|
|
@ -346,11 +346,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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue