From 07a58318ccd96c644b2748c57b285d5779fed0a8 Mon Sep 17 00:00:00 2001 From: Walter Harms Date: Fri, 7 Apr 2023 12:38:09 +0200 Subject: stop const warnings The warning occurs because XtSetArg() needs (String) aka char * and the "string" is const char * these days. --- wtree.c | 12 ++++++------ 1 file 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; -- cgit v1.2.3