From 8b6b3d438eb0e959d81b0c0cbe1885b74763fa78 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 8 Aug 2021 15:41:18 +0300 Subject: [PATCH 35/35] gtk: Drop unused variable 'total' from city_dialog_update_improvement_list() See osdn #42698 Signed-off-by: Marko Lindqvist --- client/gui-gtk-3.22/citydlg.c | 5 +---- client/gui-gtk-4.0/citydlg.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 5f9b380a3d..323b0ab38e 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -2076,7 +2076,7 @@ static void city_dialog_update_building(struct city_dialog *pdialog) **************************************************************************/ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) { - int total, item, targets_used; + int item, targets_used; struct universal targets[MAX_NUM_PRODUCTION_TARGETS]; struct item items[MAX_NUM_PRODUCTION_TARGETS]; GtkTreeModel *model; @@ -2096,7 +2096,6 @@ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) gtk_list_store_clear(store); - total = 0; for (item = 0; item < targets_used; item++) { GdkPixbuf *pix; GtkTreeIter it; @@ -2126,8 +2125,6 @@ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) tooltip_small_wonder : tooltip_sellable), -1); g_object_unref(G_OBJECT(pix)); - - total += upkeep; } } diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index 0ed7451a10..8f6abeeea2 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -2055,7 +2055,7 @@ static void city_dialog_update_building(struct city_dialog *pdialog) ***************************************************************************/ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) { - int total, item, targets_used; + int item, targets_used; struct universal targets[MAX_NUM_PRODUCTION_TARGETS]; struct item items[MAX_NUM_PRODUCTION_TARGETS]; GtkTreeModel *model; @@ -2075,7 +2075,6 @@ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) gtk_list_store_clear(store); - total = 0; for (item = 0; item < targets_used; item++) { GdkPixbuf *pix; GtkTreeIter it; @@ -2105,8 +2104,6 @@ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) tooltip_small_wonder : tooltip_sellable), -1); g_object_unref(G_OBJECT(pix)); - - total += upkeep; } } -- 2.30.2