From 3149ef16c318c0e787392be3a042d864fd604ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 25 Feb 2021 07:46:21 +0100 Subject: [PATCH] =?UTF-8?q?wayland:=20rename=20variable=20=E2=80=98main?= =?UTF-8?q?=E2=80=99=20to=20=E2=80=98main=5Fsurface=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some compilers don’t think we know what we’re doing: ../wayland.c:1554:24: error: ‘main’ is usually a function --- wayland.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wayland.c b/wayland.c index 09065b3c..a092e054 100644 --- a/wayland.c +++ b/wayland.c @@ -1551,22 +1551,24 @@ wayl_win_subsurface_new_with_custom_parent( surf->surf = NULL; surf->sub = NULL; - struct wl_surface *main = wl_compositor_create_surface(wayl->compositor); - if (main == NULL) + struct wl_surface *main_surface + = wl_compositor_create_surface(wayl->compositor); + + if (main_surface == NULL) return false; struct wl_subsurface *sub = wl_subcompositor_get_subsurface( - wayl->sub_compositor, main, parent); + wayl->sub_compositor, main_surface, parent); if (sub == NULL) { - wl_surface_destroy(main); + wl_surface_destroy(main_surface); return false; } - wl_surface_set_user_data(main, win); + wl_surface_set_user_data(main_surface, win); wl_subsurface_set_sync(sub); - surf->surf = main; + surf->surf = main_surface; surf->sub = sub; return true; }