From 9a95ce1d38c80b26c80a28f911a911654528a6fd Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 15 Oct 2022 05:53:56 +0300 Subject: [PATCH 50/50] sdl2: Fix "unused entry: file.gfx" warnings from theme See osdn #45031 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/themespec.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/gui-sdl2/themespec.c b/client/gui-sdl2/themespec.c index b15ae4ac33..ebff3ccd4a 100644 --- a/client/gui-sdl2/themespec.c +++ b/client/gui-sdl2/themespec.c @@ -509,6 +509,11 @@ static void ensure_big_sprite(struct specfile *sf) sf->file_name); exit(EXIT_FAILURE); } + + /* We don't check unused fields here as most fields are only read + * at the specs scanning time. */ + /* secfile_check_unused(file); */ + secfile_destroy(file); } @@ -533,9 +538,12 @@ static void scan_specfile(struct theme *t, struct specfile *sf, exit(EXIT_FAILURE); } - /* currently unused */ + /* Currently unused */ (void) secfile_entry_by_path(file, "info.artists"); + /* This isn't used during the scan, only when the gfx is really loaded */ + (void) secfile_entry_by_path(file, "file.gfx"); + sections = secfile_sections_by_name_prefix(file, "grid_"); if (NULL != sections) { -- 2.35.1