Re: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
On Tue, 13 Feb 2018 15:57:33 + Daniel Stonewrote: > Hi Pekka, > > On 13 February 2018 at 14:21, Pekka Paalanen wrote: > > /home/pq/git/weston/desktop-shell/shell.c: In function > > ‘shell_output_destroy_move_layer’: > > /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable > > ‘output’ [-Wunused-variable] > > struct weston_output *output = data; > > > > Since the data pointer is not used for anything, decided to also set it > > to NULL in the caller. This caused another variable to become unused. > > I just noticed that earlier whilst having fun with distcheck. Thanks for that. > > Reviewed-by: Daniel Stone Pushed: 5b0aa55d..9350bfd9 master -> master Thanks, pq pgpIQKb_YAmpL.pgp Description: OpenPGP digital signature ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
Hi Pekka, On 13 February 2018 at 14:21, Pekka Paalanenwrote: > /home/pq/git/weston/desktop-shell/shell.c: In function > ‘shell_output_destroy_move_layer’: > /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable > ‘output’ [-Wunused-variable] > struct weston_output *output = data; > > Since the data pointer is not used for anything, decided to also set it > to NULL in the caller. This caused another variable to become unused. I just noticed that earlier whilst having fun with distcheck. Thanks for that. Reviewed-by: Daniel Stone Cheers, Daniel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
RE: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
Thanks for spotting this. Reviewed-by: Marius-Vlad <marius-cristian.v...@nxp.com> -Original Message- From: wayland-devel [mailto:wayland-devel-boun...@lists.freedesktop.org] On Behalf Of Pekka Paalanen Sent: Tuesday, February 13, 2018 4:22 PM To: wayland-devel@lists.freedesktop.org Cc: Pekka Paalanen <pekka.paala...@collabora.co.uk> Subject: [PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable From: Pekka Paalanen <pekka.paala...@collabora.co.uk> /home/pq/git/weston/desktop-shell/shell.c: In function ‘shell_output_destroy_move_layer’: /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable ‘output’ [-Wunused-variable] struct weston_output *output = data; Since the data pointer is not used for anything, decided to also set it to NULL in the caller. This caused another variable to become unused. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> --- desktop-shell/shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 1c35d18a..ceb45c74 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4715,7 +4715,6 @@ shell_output_destroy_move_layer(struct desktop_shell *shell, struct weston_layer *layer, void *data) { - struct weston_output *output = data; struct weston_view *view; wl_list_for_each(view, >view_list.link, layer_link.link) @@ -4727,10 +4726,9 @@ handle_output_destroy(struct wl_listener *listener, void *data) { struct shell_output *output_listener = container_of(listener, struct shell_output, destroy_listener); - struct weston_output *output = output_listener->output; struct desktop_shell *shell = output_listener->shell; - shell_for_each_layer(shell, shell_output_destroy_move_layer, output); + shell_for_each_layer(shell, shell_output_destroy_move_layer, NULL); if (output_listener->panel_surface) wl_list_remove(_listener->panel_surface_listener.link); -- 2.13.6 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fwayland-devel=02%7C01%7Cmarius-cristian.vlad%40nxp.com%7Cd904556c45e9356a08d572ed2530%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636541285220933551=d3nvfNMxsx48ty4mqVkoahmkc9WlSelxbcWa1EkTT3M%3D=0 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] desktop-shell: fix shell_output_destroy_move_layer unused variable
From: Pekka Paalanen/home/pq/git/weston/desktop-shell/shell.c: In function ‘shell_output_destroy_move_layer’: /home/pq/git/weston/desktop-shell/shell.c:4718:24: warning: unused variable ‘output’ [-Wunused-variable] struct weston_output *output = data; Since the data pointer is not used for anything, decided to also set it to NULL in the caller. This caused another variable to become unused. Signed-off-by: Pekka Paalanen --- desktop-shell/shell.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 1c35d18a..ceb45c74 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4715,7 +4715,6 @@ shell_output_destroy_move_layer(struct desktop_shell *shell, struct weston_layer *layer, void *data) { - struct weston_output *output = data; struct weston_view *view; wl_list_for_each(view, >view_list.link, layer_link.link) @@ -4727,10 +4726,9 @@ handle_output_destroy(struct wl_listener *listener, void *data) { struct shell_output *output_listener = container_of(listener, struct shell_output, destroy_listener); - struct weston_output *output = output_listener->output; struct desktop_shell *shell = output_listener->shell; - shell_for_each_layer(shell, shell_output_destroy_move_layer, output); + shell_for_each_layer(shell, shell_output_destroy_move_layer, NULL); if (output_listener->panel_surface) wl_list_remove(_listener->panel_surface_listener.link); -- 2.13.6 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel