libweston-desktop: Fix some clang warnings

Fixes:

implicit conversion from enumeration type '...' to different
enumeration type '...' [-Wenum-conversion]

Signed-off-by: Armin Krezović <krezovic.armin@gmail.com>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
dev
Armin Krezović 8 years ago committed by Quentin Glidic
parent 5d72bc404d
commit 4e2fa0abc3
No known key found for this signature in database
GPG Key ID: AC203F96E2C34BB7
  1. 4
      libweston-desktop/wl-shell.c
  2. 4
      libweston-desktop/xdg-shell-v5.c
  3. 4
      libweston-desktop/xdg-shell-v6.c

@ -231,8 +231,10 @@ weston_desktop_wl_shell_surface_protocol_resize(struct wl_client *wl_client,
struct weston_seat *seat = wl_resource_get_user_data(seat_resource);
struct weston_desktop_wl_shell_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
enum weston_desktop_surface_edge surf_edges =
(enum weston_desktop_surface_edge) edges;
weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, edges);
weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, surf_edges);
}
static void

@ -395,9 +395,11 @@ weston_desktop_xdg_surface_protocol_resize(struct wl_client *wl_client,
wl_resource_get_user_data(seat_resource);
struct weston_desktop_xdg_surface *surface =
weston_desktop_surface_get_implementation_data(dsurface);
enum weston_desktop_surface_edge surf_edges =
(enum weston_desktop_surface_edge) edges;
weston_desktop_xdg_surface_ensure_added(surface);
weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, edges);
weston_desktop_api_resize(surface->desktop, dsurface, seat, serial, surf_edges);
}
static void

@ -396,6 +396,8 @@ weston_desktop_xdg_toplevel_protocol_resize(struct wl_client *wl_client,
wl_resource_get_user_data(seat_resource);
struct weston_desktop_xdg_toplevel *toplevel =
weston_desktop_surface_get_implementation_data(dsurface);
enum weston_desktop_surface_edge surf_edges =
(enum weston_desktop_surface_edge) edges;
if (!toplevel->base.configured) {
wl_resource_post_error(toplevel->resource,
@ -405,7 +407,7 @@ weston_desktop_xdg_toplevel_protocol_resize(struct wl_client *wl_client,
}
weston_desktop_api_resize(toplevel->base.desktop,
dsurface, seat, serial, edges);
dsurface, seat, serial, surf_edges);
}
static void

Loading…
Cancel
Save