From ef343e1cea0f735a8bb8eae837f478bcd6f7e824 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 21 Jul 2022 18:45:23 -0700 Subject: [PATCH] smyrna on_attrAddBtn_clicked: use const type to squash a -Wcast-qual warning Unfortunately we cannot also do the same for `attr_name` in this function because it is passed to a Graphviz function that accepts a non-const pointer. --- cmd/smyrna/gui/frmobjectui.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/smyrna/gui/frmobjectui.c b/cmd/smyrna/gui/frmobjectui.c index 521e8c99c..bc0da134d 100644 --- a/cmd/smyrna/gui/frmobjectui.c +++ b/cmd/smyrna/gui/frmobjectui.c @@ -514,7 +514,6 @@ _BB void on_attrAddBtn_clicked(GtkWidget * widget, gpointer user_data) (void)user_data; char *attr_name; - char *defValue; int objKind; topview *t; Agraph_t *g; @@ -525,8 +524,7 @@ _BB void on_attrAddBtn_clicked(GtkWidget * widget, gpointer user_data) attr_name = (char *) gtk_entry_get_text((GtkEntry *) glade_xml_get_widget(xml, "txtAttr")); - defValue = - (char *) gtk_entry_get_text((GtkEntry *) + const char *defValue = gtk_entry_get_text((GtkEntry *) glade_xml_get_widget(xml, "txtDefValue")); g = view->g[view->activeGraph]; -- 2.40.0