From 6cb5bf04ccdfadef8f7acd81b41b15f0cf053c5f Mon Sep 17 00:00:00 2001 From: Walter Harms Date: Fri, 7 Apr 2023 14:48:42 +0200 Subject: Fix shadowing box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit widgets.c: In function ‘CreateResourceBoxWidgets’: widgets.c:473:18: warning: declaration of ‘box’ shadows a global declaration [-Wshadow] Widget pane, box, button, viewport, pane_child; rename box to rbox --- widgets.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'widgets.c') diff --git a/widgets.c b/widgets.c index 6a56020..e85e4f5 100644 --- a/widgets.c +++ b/widgets.c @@ -470,7 +470,7 @@ LayoutTree(Widget tree) void CreateResourceBoxWidgets(WNode *node, char **names, char **cons_names) { - Widget pane, box, button, viewport, pane_child; + Widget rbox, pane, button, viewport, pane_child; ResourceBoxInfo * res_box; Dimension max_width = WidthOfScreen(XtScreen(node->widget)) - 20; Dimension max_height = HeightOfScreen(XtScreen(node->widget)) - 40; @@ -505,28 +505,28 @@ CreateResourceBoxWidgets(WNode *node, char **names, char **cons_names) XtSetKeyboardFocus(pane, res_box->value_wid); /* send keyboard to value. */ - box = XtCreateManagedWidget("commandBox", boxWidgetClass, + rbox = XtCreateManagedWidget("commandBox", boxWidgetClass, pane, NULL, ZERO); button = XtCreateManagedWidget("setFile", commandWidgetClass, - box, NULL, ZERO); + rbox, NULL, ZERO); XtAddCallback(button, XtNcallback, SetFile, NULL); button = XtCreateManagedWidget("save", commandWidgetClass, - box, NULL, ZERO); + rbox, NULL, ZERO); XtAddCallback(button, XtNcallback, SaveResource,(XtPointer) res_box); button = XtCreateManagedWidget("apply", commandWidgetClass, - box, NULL, ZERO); + rbox, NULL, ZERO); XtAddCallback(button, XtNcallback, ApplyResource,(XtPointer) node); button = XtCreateManagedWidget("saveAndApply", commandWidgetClass, - box, NULL, ZERO); + rbox, NULL, ZERO); XtAddCallback(button, XtNcallback, SaveResource,(XtPointer) res_box); XtAddCallback(button, XtNcallback, ApplyResource,(XtPointer) node); button = XtCreateManagedWidget("cancel", commandWidgetClass, - box, NULL, ZERO); + rbox, NULL, ZERO); XtAddCallback(button,XtNcallback,PopdownResBox,(XtPointer)res_box->shell); SetToggleGroupLeaders(node); -- cgit v1.2.3