summaryrefslogtreecommitdiff
path: root/tinywl.c
diff options
context:
space:
mode:
authorQuantum <[email protected]>2021-12-01 02:31:45 -0500
committerQuantum <[email protected]>2021-12-01 02:39:14 -0500
commitc89264cf2250b35978dd00f4d10641635ac5194a (patch)
tree1c2a84882517a49e75b7ce7abe36981bb74bb7f6 /tinywl.c
parent6c7e8461f85f5ed0eac52c79c1fef18f73ce949b (diff)
Fix uninitialized variable errors in release mode
When using `meson --buildtype=release`, `-Wextra -Werror` is passed. This includes `-Werror=maybe-uninitialized`, which complains about the instances fixed in this commit.
Diffstat (limited to 'tinywl.c')
-rw-r--r--tinywl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tinywl.c b/tinywl.c
index 5ce7c4e..4877574 100644
--- a/tinywl.c
+++ b/tinywl.c
@@ -475,7 +475,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data) {
wlr_seat_pointer_notify_button(server->seat,
event->time_msec, event->button, event->state);
double sx, sy;
- struct wlr_surface *surface;
+ struct wlr_surface *surface = NULL;
struct tinywl_view *view = desktop_view_at(server,
server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (event->state == WLR_BUTTON_RELEASED) {