aboutsummaryrefslogtreecommitdiff
path: root/examples/tablet.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-20 00:45:19 +0100
committerScott Anderson <scott@anderso.nz>2019-11-20 02:05:03 +0000
commit16e5e9541b3de49e397a3d2caa3212db25487648 (patch)
tree9d1cc82dc037db865181a6742eade6d866803cd9 /examples/tablet.c
parent685a5a11a9f6305f7479550247b333ffdf036d73 (diff)
Add -Wmissing-prototypes
This requires functions without a prototype definition to be static. This allows to detect dead code, export less symbols and put shared functions in headers.
Diffstat (limited to 'examples/tablet.c')
-rw-r--r--examples/tablet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/tablet.c b/examples/tablet.c
index d437ff17..d33fb224 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -227,14 +227,14 @@ static void tablet_pad_destroy_notify(struct wl_listener *listener, void *data)
free(pstate);
}
-void output_remove_notify(struct wl_listener *listener, void *data) {
+static void output_remove_notify(struct wl_listener *listener, void *data) {
struct sample_output *sample_output = wl_container_of(listener, sample_output, destroy);
wl_list_remove(&sample_output->frame.link);
wl_list_remove(&sample_output->destroy.link);
free(sample_output);
}
-void new_output_notify(struct wl_listener *listener, void *data) {
+static void new_output_notify(struct wl_listener *listener, void *data) {
struct wlr_output *output = data;
struct sample_state *sample = wl_container_of(listener, sample, new_output);
struct sample_output *sample_output = calloc(1, sizeof(struct sample_output));
@@ -250,7 +250,7 @@ void new_output_notify(struct wl_listener *listener, void *data) {
sample_output->destroy.notify = output_remove_notify;
}
-void keyboard_key_notify(struct wl_listener *listener, void *data) {
+static void keyboard_key_notify(struct wl_listener *listener, void *data) {
struct sample_keyboard *keyboard = wl_container_of(listener, keyboard, key);
struct sample_state *sample = keyboard->sample;
struct wlr_event_keyboard_key *event = data;
@@ -266,14 +266,14 @@ void keyboard_key_notify(struct wl_listener *listener, void *data) {
}
}
-void keyboard_destroy_notify(struct wl_listener *listener, void *data) {
+static void keyboard_destroy_notify(struct wl_listener *listener, void *data) {
struct sample_keyboard *keyboard = wl_container_of(listener, keyboard, destroy);
wl_list_remove(&keyboard->destroy.link);
wl_list_remove(&keyboard->key.link);
free(keyboard);
}
-void new_input_notify(struct wl_listener *listener, void *data) {
+static void new_input_notify(struct wl_listener *listener, void *data) {
struct wlr_input_device *device = data;
struct sample_state *sample = wl_container_of(listener, sample, new_input);
switch (device->type) {