From 652c9b05d6a76e62a8280d0a1a7d3306b966567e Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 8 Aug 2021 14:33:53 +0300 Subject: [PATCH 9/9] gtk: Drop unused variable 'total' from city_dialog_update_improvement_list() See osdn #42698 Signed-off-by: Marko Lindqvist --- client/gui-gtk-2.0/citydlg.c | 5 +---- client/gui-gtk-3.0/citydlg.c | 5 +---- client/gui-gtk-3.22/citydlg.c | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/client/gui-gtk-2.0/citydlg.c b/client/gui-gtk-2.0/citydlg.c index 1c5ae5b4e2..ecba152366 100644 --- a/client/gui-gtk-2.0/citydlg.c +++ b/client/gui-gtk-2.0/citydlg.c @@ -1785,7 +1785,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; @@ -1805,7 +1805,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++) { GtkTreeIter it; int upkeep; @@ -1832,8 +1831,6 @@ static void city_dialog_update_improvement_list(struct city_dialog *pdialog) (is_small_wonder(target.value.building) ? tooltip_small_wonder : tooltip_sellable), -1); - - total += upkeep; } } diff --git a/client/gui-gtk-3.0/citydlg.c b/client/gui-gtk-3.0/citydlg.c index 2db7b699af..42c7b7c133 100644 --- a/client/gui-gtk-3.0/citydlg.c +++ b/client/gui-gtk-3.0/citydlg.c @@ -2033,7 +2033,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; @@ -2053,7 +2053,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; @@ -2083,8 +2082,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-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 90609fe8bb..1c653c19c6 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -2090,7 +2090,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; @@ -2110,7 +2110,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; @@ -2140,8 +2139,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