From edbc83f8f242384c7f82e2546dac2830baea3ab1 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 31 Aug 2022 02:13:58 +0300 Subject: [PATCH 2/2] Savegame: Silence "unused entry" warnings about city_options See osdn #45526 Signed-off-by: Marko Lindqvist --- server/savegame2.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/server/savegame2.c b/server/savegame2.c index fdfcdea2a7..27b9b66496 100644 --- a/server/savegame2.c +++ b/server/savegame2.c @@ -1887,13 +1887,23 @@ static void sg_load_savefile(struct loaddata *loading) for (j = 0; j < loading->ds_t.size; j++) { loading->ds_t.order[j] = diplstate_type_by_name(modname[j], - fc_strcasecmp); + fc_strcasecmp); } free(modname); } - terrain_type_iterate(pterr) { + /* Not used by this freeciv version - for future use */ + { + int j; + + i = secfile_lookup_int_default(loading->file, 0, "savefile.city_options_size"); + for (j = 0; j < i; j++) { + (void) secfile_entry_lookup(loading->file, "savefile.city_options_vector,%d", j); + } + } + + terrain_type_iterate(pterr) { pterr->identifier_load = '\0'; } terrain_type_iterate_end; -- 2.35.1