From: Matthew Fernandez Date: Fri, 22 Jul 2022 01:45:23 +0000 (-0700) Subject: smyrna on_attrAddBtn_clicked: use const type to squash a -Wcast-qual warning X-Git-Tag: 5.0.1~29^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ef343e1cea0f735a8bb8eae837f478bcd6f7e824;p=graphviz 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. --- 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];