From 31fbaedadf116656bab7de01e0717a8c7c3a0b96 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 10 Sep 2022 05:53:38 +0300 Subject: [PATCH 53/53] city_choose_build_default(): Fix dead assignment on NDEBUG build See osdn #45633 Signed-off-by: Marko Lindqvist --- common/city.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/city.c b/common/city.c index 9a8685d43b..861cfd3c9b 100644 --- a/common/city.c +++ b/common/city.c @@ -1093,7 +1093,10 @@ void city_choose_build_default(struct city *pcity) if (!found) { unit_type_iterate(punittype) { if (can_city_build_unit_direct(pcity, punittype)) { +#ifndef FREECIV_NDEBUG + /* Later than this, 'found' is only needed in an fc_assert() */ found = TRUE; +#endif /* FREECIV_NDEBUG */ pcity->production.kind = VUT_UTYPE; pcity->production.value.utype = punittype; } -- 2.35.1