diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index cc5763be..3cd7061d 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1912,7 +1912,7 @@ tp_handle_state(struct tp_dispatch *tp, tp_3fg_drag_apply_config(tp->device); } -LIBINPUT_UNUSED +_unused_ static inline void tp_debug_touch_state(struct tp_dispatch *tp, struct evdev_device *device) diff --git a/src/evdev.c b/src/evdev.c index d5bb4672..770b270e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1022,7 +1022,7 @@ evdev_read_switch_reliability_prop(struct evdev_device *device) return r; } -LIBINPUT_UNUSED +_unused_ static inline void evdev_print_event(struct evdev_device *device, const struct input_event *e) diff --git a/src/libinput-util.h b/src/libinput-util.h index 4e363177..d19f43b7 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -70,7 +70,6 @@ #define etrace(...) _trace(stderr, __VA_ARGS__) #define LIBINPUT_EXPORT __attribute__ ((visibility("default"))) -#define LIBINPUT_UNUSED __attribute__ ((unused)) /* Commonly-used cleanup */ #ifdef udev_list_entry_foreach diff --git a/src/libinput.c b/src/libinput.c index 037075ab..5273f094 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -3173,7 +3173,7 @@ switch_notify_toggle(struct libinput_device *device, #endif } -LIBINPUT_UNUSED +_unused_ static inline void libinput_print_queued_event(struct libinput_event *event) { diff --git a/src/util-macros.h b/src/util-macros.h index 4fb78dc3..2083bfc9 100644 --- a/src/util-macros.h +++ b/src/util-macros.h @@ -75,4 +75,5 @@ #define CONCAT2(X,Y) X##Y #define CONCAT(X,Y) CONCAT2(X,Y) +#define _unused_ __attribute__((unused)) #define _fallthrough_ __attribute__((fallthrough)) diff --git a/test/litest.h b/test/litest.h index e65f8597..6fd26908 100644 --- a/test/litest.h +++ b/test/litest.h @@ -42,7 +42,7 @@ #define START_TEST(func_) \ static enum litest_runner_result func_(const struct litest_runner_test_env *test_env) { \ - int _i __attribute__((unused)) = test_env->rangeval; + int _i _unused_ = test_env->rangeval; #define END_TEST \ return LITEST_PASS; \