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.
This commit is contained in:
Quantum 2021-12-01 02:31:45 -05:00
parent 611b9ca843
commit 812ab2e716
2 changed files with 2 additions and 2 deletions

View File

@ -468,7 +468,7 @@ struct wlr_wl_input_device *create_wl_input_device(
unsigned int vendor = 0, product = 0; unsigned int vendor = 0, product = 0;
const char *type_name; const char *type_name = "unknown";
switch (type) { switch (type) {
case WLR_INPUT_DEVICE_KEYBOARD: case WLR_INPUT_DEVICE_KEYBOARD:

View File

@ -475,7 +475,7 @@ static void server_cursor_button(struct wl_listener *listener, void *data) {
wlr_seat_pointer_notify_button(server->seat, wlr_seat_pointer_notify_button(server->seat,
event->time_msec, event->button, event->state); event->time_msec, event->button, event->state);
double sx, sy; double sx, sy;
struct wlr_surface *surface; struct wlr_surface *surface = NULL;
struct tinywl_view *view = desktop_view_at(server, struct tinywl_view *view = desktop_view_at(server,
server->cursor->x, server->cursor->y, &surface, &sx, &sy); server->cursor->x, server->cursor->y, &surface, &sx, &sy);
if (event->state == WLR_BUTTON_RELEASED) { if (event->state == WLR_BUTTON_RELEASED) {