From d6386089184134cdddd4b15bf65171e8abdaa9a1 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 5 Mar 2022 22:21:14 +0200 Subject: [PATCH 43/43] city_size_add(): Use variable 'size' instead of recalculating Most importantly this fixes "set but unused variable" -warning on FREECIV_NDEBUG build. See osdn #44019 Signed-off-by: Marko Lindqvist --- common/city.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/city.c b/common/city.c index fc3b2fbbc0..edd0823c17 100644 --- a/common/city.c +++ b/common/city.c @@ -1136,7 +1136,7 @@ void city_size_add(struct city *pcity, int add) fc_assert_ret(MAX_CITY_SIZE - size > add); fc_assert_ret(size >= -add); - city_size_set(pcity, city_size_get(pcity) + add); + city_size_set(pcity, size + add); } /**********************************************************************//** -- 2.34.1