From 6d1cf6847bf239102d1736e79867c218e7018155 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 31 Aug 2022 02:08:17 +0300 Subject: [PATCH 24/24] Savegame: Silence "unused entry" warnings about city_options See osdn #45526 Signed-off-by: Marko Lindqvist --- server/savegame2.c | 12 +++++++++++- server/savegame3.c | 10 ++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/server/savegame2.c b/server/savegame2.c index e46165d52f..d3db307e98 100644 --- a/server/savegame2.c +++ b/server/savegame2.c @@ -1437,12 +1437,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/savegame3.c b/server/savegame3.c index fb1062d688..e5ece45619 100644 --- a/server/savegame3.c +++ b/server/savegame3.c @@ -1571,6 +1571,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