summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Expósito <jose.exposito89@gmail.com>2024-03-18 16:24:11 +0100
committerMarge Bot <emma+marge@anholt.net>2024-03-18 23:35:34 +0000
commitf6a1f264df3abd5a59bfea0a5a3cfa5e846279aa (patch)
treea09c64e68979eec7c6923fdaa1d47272cf436f0e
parent74f69dc9a0dbbabe761f65daec07fc7b23911fa0 (diff)
sparse: make some variables static
Fix warnings about variables that should be made static when compiling with Sparse enabled: $ CC=cgcc meson builddir Signed-off-by: José Expósito <jose.exposito89@gmail.com> Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/987>
-rw-r--r--src/evdev-fallback.c2
-rw-r--r--src/evdev-totem.c2
-rw-r--r--src/filter-custom.c2
-rw-r--r--test/litest-device-synaptics-st.c2
-rw-r--r--test/test-device.c2
-rw-r--r--test/test-misc.c2
-rw-r--r--tools/libinput-debug-gui.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c
index a9711874..0b756610 100644
--- a/src/evdev-fallback.c
+++ b/src/evdev-fallback.c
@@ -1422,7 +1422,7 @@ fallback_interface_device_removed(struct evdev_device *device,
}
}
-struct evdev_dispatch_interface fallback_interface = {
+static struct evdev_dispatch_interface fallback_interface = {
.process = fallback_interface_process,
.suspend = fallback_interface_suspend,
.remove = fallback_interface_remove,
diff --git a/src/evdev-totem.c b/src/evdev-totem.c
index 4dd9eb40..94a3932b 100644
--- a/src/evdev-totem.c
+++ b/src/evdev-totem.c
@@ -698,7 +698,7 @@ totem_interface_initial_proximity(struct evdev_device *device,
totem_set_touch_device_enabled(totem, enable_touch, now);
}
-struct evdev_dispatch_interface totem_interface = {
+static struct evdev_dispatch_interface totem_interface = {
.process = totem_interface_process,
.suspend = totem_interface_suspend,
.remove = NULL,
diff --git a/src/filter-custom.c b/src/filter-custom.c
index b2eb75c8..0d25b909 100644
--- a/src/filter-custom.c
+++ b/src/filter-custom.c
@@ -404,7 +404,7 @@ custom_accelerator_filter_scroll(struct motion_filter *filter,
time);
}
-struct motion_filter_interface custom_accelerator_interface = {
+static struct motion_filter_interface custom_accelerator_interface = {
.type = LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM,
.filter = custom_accelerator_filter_motion,
.filter_constant = custom_accelerator_filter_fallback,
diff --git a/test/litest-device-synaptics-st.c b/test/litest-device-synaptics-st.c
index e23dcd86..98fe0174 100644
--- a/test/litest-device-synaptics-st.c
+++ b/test/litest-device-synaptics-st.c
@@ -42,7 +42,7 @@ static struct input_event move[] = {
{ .type = -1, .code = -1 },
};
-struct input_event up[] = {
+static struct input_event up[] = {
{ .type = EV_SYN, .code = SYN_REPORT, .value = 0 },
{ .type = -1, .code = -1 },
};
diff --git a/test/test-device.c b/test/test-device.c
index 55dd12b1..32635d8d 100644
--- a/test/test-device.c
+++ b/test/test-device.c
@@ -1442,7 +1442,7 @@ START_TEST(device_quirks_logitech_marble_mouse)
}
END_TEST
-char *debug_messages[64] = { NULL };
+static char *debug_messages[64] = { NULL };
LIBINPUT_ATTRIBUTE_PRINTF(3, 0)
static void
diff --git a/test/test-misc.c b/test/test-misc.c
index e6e3c460..301af712 100644
--- a/test/test-misc.c
+++ b/test/test-misc.c
@@ -594,7 +594,7 @@ static void close_restricted_leak(int fd, void *data)
/* noop */
}
-const struct libinput_interface leak_interface = {
+static const struct libinput_interface leak_interface = {
.open_restricted = open_restricted_leak,
.close_restricted = close_restricted_leak,
};
diff --git a/tools/libinput-debug-gui.c b/tools/libinput-debug-gui.c
index a1300c64..4618f49d 100644
--- a/tools/libinput-debug-gui.c
+++ b/tools/libinput-debug-gui.c
@@ -238,7 +238,7 @@ wayland_registry_global_remove(void *data,
}
-struct wl_registry_listener registry_listener = {
+static struct wl_registry_listener registry_listener = {
wayland_registry_global,
wayland_registry_global_remove
};