From 669ba19f67eb0966d6ffd5c306dacbaabeccf696 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 18 Dec 2022 12:49:00 +0200 Subject: [PATCH 40/40] Savegame: Fix "unused entry" warnings about random seeds See osdn #46144 Signed-off-by: Marko Lindqvist --- server/savegame/savegame3.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c index 4cb4b10670..10fabb885f 100644 --- a/server/savegame/savegame3.c +++ b/server/savegame/savegame3.c @@ -2109,6 +2109,10 @@ static void sg_load_game(struct loaddata *loading) game.info.coolinglevel = secfile_lookup_int_default(loading->file, 0, "game.coolinglevel"); + /* Savegame may store random_seed for documentation purposes only, + * we don't need it. Just silence "unused entry" warning. */ + (void) secfile_entry_lookup(loading->file, "game.random_seed"); + /* Global advances. */ str = secfile_lookup_str_default(loading->file, NULL, "game.global_advances"); @@ -2720,6 +2724,10 @@ static void sg_load_map(struct loaddata *loading) wld.map.server.have_resources = game.scenario.have_resources; + /* Savegame may store random_seed for documentation purposes only, + * we don't need it. Just silence "unused entry" warning. */ + (void) secfile_entry_lookup(loading->file, "map.random_seed"); + if (S_S_INITIAL == loading->server_state && MAPGEN_SCENARIO == wld.map.server.generator) { /* Generator MAPGEN_SCENARIO is used; -- 2.35.1