From 395d12d63446a1897dd64f35c2eb603203d55c21 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 7 Mar 2022 14:44:21 +1000 Subject: 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 --- udev/libinput-fuzz-extract.c | 2 -- udev/libinput-fuzz-to-zero.c | 1 - 2 files changed, 3 deletions(-) (limited to 'udev') 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, -- cgit v1.2.1