From c971d0c0ff247261b3b78285464506e1b3dce7bc Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 1 Oct 2022 13:14:51 +0300 Subject: [PATCH 38/38] Fix dead assignment in upgrade_unit_order_targets() See osdn #45735 Signed-off-by: Marko Lindqvist --- server/savegame/savecompat.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c index 80da23de25..2527ddba9e 100644 --- a/server/savegame/savecompat.c +++ b/server/savegame/savecompat.c @@ -1758,8 +1758,10 @@ static void upgrade_unit_order_targets(struct unit *act_unit) if (order->order == ORDER_PERFORM_ACTION && order->target != NO_TARGET) { /* The target is already specified in the new format. */ - tgt_tile = index_to_tile(&(wld.map), order->target); - fc_assert(tgt_tile != NULL); + + /* The index_to_tile() call has no side-effects that we + * would want also in NDEBUG builds. */ + fc_assert(index_to_tile(&(wld.map), order->target) != NULL); return; } -- 2.35.1