summaryrefslogtreecommitdiff
path: root/wtree.c
diff options
context:
space:
mode:
authorWalter Harms <xt4ever@web.de>2023-04-07 12:38:09 +0200
committerWalter Harms <xt4ever@web.de>2023-04-07 12:38:09 +0200
commit07a58318ccd96c644b2748c57b285d5779fed0a8 (patch)
tree11b2fb75f8ebea7b450f18d9a6703e01711a9864 /wtree.c
parentce35acb5b2a0892863fc63a1315a60cbbb7f553f (diff)
stop const warnings
The warning occurs because XtSetArg() needs (String) aka char * and the "string" is const char * these days.
Diffstat (limited to 'wtree.c')
-rw-r--r--wtree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wtree.c b/wtree.c
index b53b024..bbd363c 100644
--- a/wtree.c
+++ b/wtree.c
@@ -115,7 +115,7 @@ AddTreeNode(Widget tree, WNode *top)
top->name, top->parent->name, "not been created yet");
SetMessage(global_screen_data.info_label, msg);
}
- XtSetArg(args[num_args], XtNtreeParent, top->parent->widget);
+ XtSetArg(args[num_args], (String)XtNtreeParent, top->parent->widget);
num_args++;
}
@@ -369,7 +369,7 @@ _TreeSelectNode(WNode *node, SelectTypes type, Boolean recurse)
state = FALSE;
break;
case SelectInvert:
- XtSetArg(args[0], XtNstate, &state);
+ XtSetArg(args[0], (String)XtNstate, &state);
XtGetValues(node->widget, args, ONE);
state = !state;
@@ -380,7 +380,7 @@ _TreeSelectNode(WNode *node, SelectTypes type, Boolean recurse)
return;
}
- XtSetArg(args[0], XtNstate, state);
+ XtSetArg(args[0], (String)XtNstate, state);
XtSetValues(node->widget, args, ONE);
TreeToggle(node->widget, (XtPointer) node, (XtPointer)(long) state);
@@ -426,10 +426,10 @@ _TreeRelabelNode(WNode *node, LabelTypes type, Boolean recurse)
else
snprintf(buf, sizeof(buf), "win: 0x%lx", node->window);
- XtSetArg(args[0], XtNlabel, buf);
+ XtSetArg(args[0], (String)XtNlabel, buf);
break;
case ToggleLabel:
- XtSetArg(args[0], XtNlabel, &label);
+ XtSetArg(args[0], (String)XtNlabel, &label);
XtGetValues(node->widget, args, ONE);
if (label && !strcmp(label, node->name))
XtSetArg(args[0], XtNlabel, node->class);
@@ -465,7 +465,7 @@ _TreeActivateNode(WNode* node, SelectTypes type)
Arg args[1];
Cardinal i;
- XtSetArg(args[0], XtNstate, TRUE);
+ XtSetArg(args[0], (String)XtNstate, TRUE);
if ((type == SelectParent) || (type == SelectAncestors)) {
node = node->parent;