[PATCH] libweston-desktop: Fix some clang warnings

Quentin Glidic sardemff7+wayland at sardemff7.net
Sat Sep 24 10:42:17 UTC 2016


On 10/09/2016 19:11, Armin Krezović wrote:
> Fixes:
>
> implicit conversion from enumeration type '...' to different
> enumeration type '...' [-Wenum-conversion]
>
> Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>

I do not like the variable name, but let’s keep that for later.

Reviewed-by: Quentin Glidic <sardemff7+git at sardemff7.net>
And pushed:
5d72bc4..4e2fa0a  master -> master

Cheers,


> ---
>  libweston-desktop/wl-shell.c     | 4 +++-
>  libweston-desktop/xdg-shell-v5.c | 4 +++-
>  libweston-desktop/xdg-shell-v6.c | 4 +++-
>  3 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c
> index 74ce473..97f6e06 100644
> --- a/libweston-desktop/wl-shell.c
> +++ b/libweston-desktop/wl-shell.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
> diff --git a/libweston-desktop/xdg-shell-v5.c b/libweston-desktop/xdg-shell-v5.c
> index 83e5d30..ef292a8 100644
> --- a/libweston-desktop/xdg-shell-v5.c
> +++ b/libweston-desktop/xdg-shell-v5.c
> @@ -393,9 +393,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
> diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c
> index 70e9132..1f9ac94 100644
> --- a/libweston-desktop/xdg-shell-v6.c
> +++ b/libweston-desktop/xdg-shell-v6.c
> @@ -368,9 +368,11 @@ 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;
>
>  	weston_desktop_api_resize(toplevel->base.desktop,
> -				  dsurface, seat, serial, edges);
> +				  dsurface, seat, serial, surf_edges);
>  }
>
>  static void
>


-- 

Quentin “Sardem FF7” Glidic


More information about the wayland-devel mailing list