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>
This commit is contained in:
José Expósito 2024-03-18 16:24:11 +01:00 committed by Marge Bot
parent 74f69dc9a0
commit f6a1f264df
7 changed files with 7 additions and 7 deletions

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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 },
};

View file

@ -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

View file

@ -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,
};

View file

@ -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
};