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.
This commit is contained in:
Simon Ser 2019-11-20 00:45:19 +01:00 committed by Scott Anderson
parent 685a5a11a9
commit 16e5e9541b
24 changed files with 66 additions and 123 deletions

View file

@ -244,7 +244,7 @@ static const struct wlr_pointer_grab_interface
.cancel = drag_handle_pointer_cancel,
};
uint32_t drag_handle_touch_down(struct wlr_seat_touch_grab *grab,
static uint32_t drag_handle_touch_down(struct wlr_seat_touch_grab *grab,
uint32_t time, struct wlr_touch_point *point) {
// eat the event
return 0;

View file

@ -35,12 +35,12 @@ static void toplevel_handle_send_maximized_event(struct wl_resource *resource,
wlr_signal_emit_safe(&toplevel->events.request_maximize, &event);
}
void foreign_toplevel_handle_set_maximized(struct wl_client *client,
static void foreign_toplevel_handle_set_maximized(struct wl_client *client,
struct wl_resource *resource) {
toplevel_handle_send_maximized_event(resource, true);
}
void foreign_toplevel_handle_unset_maximized(struct wl_client *client,
static void foreign_toplevel_handle_unset_maximized(struct wl_client *client,
struct wl_resource *resource) {
toplevel_handle_send_maximized_event(resource, false);
}

View file

@ -452,7 +452,7 @@ enum distance_selection_method {
FARTHEST
};
struct wlr_output *wlr_output_layout_output_in_direction(
static struct wlr_output *wlr_output_layout_output_in_direction(
struct wlr_output_layout *layout, enum wlr_direction direction,
struct wlr_output *reference, double ref_lx, double ref_ly,
enum distance_selection_method distance_method) {

View file

@ -477,7 +477,7 @@ static const struct zwlr_screencopy_manager_v1_interface manager_impl = {
.destroy = manager_handle_destroy,
};
void manager_handle_resource_destroy(struct wl_resource *resource) {
static void manager_handle_resource_destroy(struct wl_resource *resource) {
struct wlr_screencopy_v1_client *client =
client_from_resource(resource);
client_unref(client);

View file

@ -138,7 +138,8 @@ void wlr_server_decoration_manager_set_default_mode(
}
}
void server_decoration_manager_destroy_resource(struct wl_resource *resource) {
static void server_decoration_manager_destroy_resource(
struct wl_resource *resource) {
wl_list_remove(wl_resource_get_link(resource));
}

View file

@ -238,7 +238,8 @@ static const struct zxdg_decoration_manager_v1_interface
.get_toplevel_decoration = decoration_manager_handle_get_toplevel_decoration,
};
void decoration_manager_handle_resource_destroy(struct wl_resource *resource) {
static void decoration_manager_handle_resource_destroy(
struct wl_resource *resource) {
wl_list_remove(wl_resource_get_link(resource));
}