From 7ae20e63b1bf4afc5273b8a57a811faa04d20598 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 30 Nov 2022 03:35:42 +0200 Subject: [PATCH 6/6] savegame2.c: Fix activities order "unused entry" warnings See osdn #46143 Signed-off-by: Marko Lindqvist --- server/savegame2.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/server/savegame2.c b/server/savegame2.c index 27b9b66496..50d1428060 100644 --- a/server/savegame2.c +++ b/server/savegame2.c @@ -1645,6 +1645,19 @@ static void sg_load_savefile(struct loaddata *loading) secfile_error()); } + /* Since freeciv-2.6 savegame format contains activities order, for the + * benefit of future versions. This version does not need them. + * Just lookup the entries to avoid warnings about unused entries. */ + { + int j; + + i = secfile_lookup_int_default(loading->file, 0, "savefile.activities_size"); + for (j = 0; j < i; j++) { + (void) secfile_entry_lookup(loading->file, + "savefile.activities_vector,%d", j); + } + } + /* Load traits. */ loading->trait.size = secfile_lookup_int_default(loading->file, 0, -- 2.35.1