summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2022-03-07 14:44:21 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2022-03-09 10:16:07 +1000
commit395d12d63446a1897dd64f35c2eb603203d55c21 (patch)
treecaa6beb13eb89b3babadd1889a61e2e307093bfd /udev
parent1f1ddbc6dff0cf0451e3c9ac923f9821278560aa (diff)
downloadlibinput-395d12d63446a1897dd64f35c2eb603203d55c21.tar.gz
util: auto-declare the element variable in ARRAY_FOR_EACH
All cases we have in our code base have an otherwise unused variable to loop through the array. Let's auto-declare this as part of the loop. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'udev')
-rw-r--r--udev/libinput-fuzz-extract.c2
-rw-r--r--udev/libinput-fuzz-to-zero.c1
2 files changed, 0 insertions, 3 deletions
diff --git a/udev/libinput-fuzz-extract.c b/udev/libinput-fuzz-extract.c
index 48ef79ce..6158e357 100644
--- a/udev/libinput-fuzz-extract.c
+++ b/udev/libinput-fuzz-extract.c
@@ -46,7 +46,6 @@ handle_absfuzz(struct udev_device *device)
struct libevdev *evdev = NULL;
int fd = -1;
int rc;
- unsigned int *code;
unsigned int axes[] = {ABS_X,
ABS_Y,
ABS_MT_POSITION_X,
@@ -88,7 +87,6 @@ out:
static void
handle_evdev_abs(struct udev_device *device)
{
- unsigned int *code;
unsigned int axes[] = {ABS_X,
ABS_Y,
ABS_MT_POSITION_X,
diff --git a/udev/libinput-fuzz-to-zero.c b/udev/libinput-fuzz-to-zero.c
index a8767bed..e2e9a036 100644
--- a/udev/libinput-fuzz-to-zero.c
+++ b/udev/libinput-fuzz-to-zero.c
@@ -39,7 +39,6 @@ reset_absfuzz_to_zero(struct udev_device *device)
struct libevdev *evdev = NULL;
int fd = -1;
int rc;
- unsigned int *code;
unsigned int axes[] = {ABS_X,
ABS_Y,
ABS_MT_POSITION_X,