aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ongyerth <ongy@ongy.net>2018-05-17 11:15:07 +0200
committerMarkus Ongyerth <ongy@ongy.net>2018-07-14 09:47:16 +0200
commit6a40561e4cddae0f6c3325afd96c7f38e8f649d1 (patch)
tree2904de637871d0ab17c26cbb01ffacbfb07a8782
parent2155c976f61aa569f5da94bd2e933f5b40534ceb (diff)
Fix clang build errors
-rw-r--r--rootston/seat.c7
-rw-r--r--types/wlr_tablet_v2.c10
2 files changed, 10 insertions, 7 deletions
diff --git a/rootston/seat.c b/rootston/seat.c
index 3ca1404e..d49d71cc 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -201,7 +201,9 @@ static void handle_tool_button(struct wl_listener *listener, void *data) {
struct wlr_event_tablet_tool_button *event = data;
struct roots_tablet_tool_tool *roots_tool = event->tool->data;
- wlr_send_tablet_v2_tablet_tool_button(roots_tool->tablet_v2_tool, event->button, event->state);
+ wlr_send_tablet_v2_tablet_tool_button(roots_tool->tablet_v2_tool,
+ (enum zwp_tablet_pad_v2_button_state)event->button,
+ (enum zwp_tablet_pad_v2_button_state)event->state);
}
static void handle_tablet_tool_set_cursor(struct wl_listener *listener, void *data) {
@@ -757,7 +759,8 @@ static void handle_tablet_pad_button(struct wl_listener *listener, void *data) {
event->group, event->mode, event->time_msec);
wlr_send_tablet_v2_tablet_pad_button(pad->tablet_v2_pad,
- event->button, event->time_msec, event->state);
+ event->button, event->time_msec,
+ (enum zwp_tablet_pad_v2_button_state)event->state);
}
static void seat_add_tablet_pad(struct roots_seat *seat,
diff --git a/types/wlr_tablet_v2.c b/types/wlr_tablet_v2.c
index 781e52f9..74327c9c 100644
--- a/types/wlr_tablet_v2.c
+++ b/types/wlr_tablet_v2.c
@@ -250,7 +250,7 @@ static void handle_tablet_tool_v2_set_cursor(struct wl_client *client,
return;
}
- struct wlr_surface *surface;
+ struct wlr_surface *surface = NULL;
if (surface_resource != NULL) {
surface = wlr_surface_from_resource(surface_resource);
if (!wlr_surface_set_role(surface, &pointer_cursor_surface_role, NULL,
@@ -1168,8 +1168,8 @@ uint32_t wlr_send_tablet_v2_tablet_tool_proximity_in(
return 0;
}
- struct wlr_tablet_tool_client_v2 *tool_tmp;
- struct wlr_tablet_tool_client_v2 *tool_client;
+ struct wlr_tablet_tool_client_v2 *tool_tmp = NULL;
+ struct wlr_tablet_tool_client_v2 *tool_client = NULL;
wl_list_for_each(tool_tmp, &tool->clients, tool_link) {
if (tool_tmp->client == client) {
tool_client = tool_tmp;
@@ -1284,8 +1284,8 @@ uint32_t wlr_send_tablet_v2_tablet_pad_enter(
return 0;
}
- struct wlr_tablet_pad_client_v2 *pad_tmp;
- struct wlr_tablet_pad_client_v2 *pad_client;
+ struct wlr_tablet_pad_client_v2 *pad_tmp = NULL;
+ struct wlr_tablet_pad_client_v2 *pad_client = NULL;
wl_list_for_each(pad_tmp, &pad->clients, pad_link) {
if (pad_tmp->client == client) {
pad_client = pad_tmp;