From: Matthew Fernandez Date: Mon, 5 Sep 2022 17:13:56 +0000 (-0700) Subject: GTK plugin attr_value_edited_cb: remove shadowing of global 'path' X-Git-Tag: 6.0.1~2^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8594c8dbf2877c52e47ea0d76c920a0a9a04ec42;p=graphviz GTK plugin attr_value_edited_cb: remove shadowing of global 'path' --- diff --git a/plugin/gtk/gvdevice_gtk.c b/plugin/gtk/gvdevice_gtk.c index 8612f7502..e18d950e9 100644 --- a/plugin/gtk/gvdevice_gtk.c +++ b/plugin/gtk/gvdevice_gtk.c @@ -33,23 +33,22 @@ attr_value_edited_cb(GtkCellRendererText *renderer, gchar *pathStr, gchar *newTe (void)renderer; GtkTreeModel *model = GTK_TREE_MODEL(data); - GtkTreePath *path; GtkTreeIter iter; gchar *old_attr; - path = gtk_tree_path_new_from_string(pathStr); + GtkTreePath *treepath = gtk_tree_path_new_from_string(pathStr); // need to free old attr value in job and allocate new attr value - how? // free old attr value in model - gtk_tree_model_get_iter(model, &iter, path); + gtk_tree_model_get_iter(model, &iter, treepath); gtk_tree_model_get(model, &iter, 1, &old_attr, -1); g_free(old_attr); // set new attr value in model gtk_list_store_set(GTK_LIST_STORE(model), &iter, 1, g_strdup(newText), -1); - gtk_tree_path_free(path); + gtk_tree_path_free(treepath); } static void gtk_initialize(GVJ_t *firstjob)