From f068a665fea8f63ca8c0f75fd9c70d6d165bf230 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 31 Aug 2022 02:11:18 +0300 Subject: [PATCH 45/45] Savegame: Silence "unused entry" warnings about city_options See osdn #45526 Signed-off-by: Marko Lindqvist --- server/savegame/savegame2.c | 12 +++++++++++- server/savegame/savegame3.c | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/server/savegame/savegame2.c b/server/savegame/savegame2.c index 458af51991..a5cd0a08c6 100644 --- a/server/savegame/savegame2.c +++ b/server/savegame/savegame2.c @@ -1448,12 +1448,22 @@ 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); } + /* 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; diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c index 1e4a2ad359..b60a621617 100644 --- a/server/savegame/savegame3.c +++ b/server/savegame/savegame3.c @@ -1601,6 +1601,16 @@ static void sg_load_savefile(struct loaddata *loading) free(modname); } + /* 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