summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWalter Harms <xt4ever@web.de>2023-04-07 14:48:42 +0200
committerWalter Harms <xt4ever@web.de>2023-04-07 14:48:42 +0200
commit6cb5bf04ccdfadef8f7acd81b41b15f0cf053c5f (patch)
tree6a01762601cd153805a3a743c8f3e3b13d9e69d4
parentc10de6efe50fcd7be57e79274889d11e6845f82e (diff)
Fix shadowing box
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
-rw-r--r--widgets.c14
1 files changed, 7 insertions, 7 deletions
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);