From e0f6c6987b67f665200ceda919d1622914743ca4 Mon Sep 17 00:00:00 2001 From: PatR Date: Sun, 19 Jan 2025 12:16:16 -0800 Subject: [PATCH] analyzer lint for files.c Not sure about 'do_historical' since it isn't used--or implicitly is always used--without the field-by-field save and restore as an alternative. --- src/files.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/files.c b/src/files.c index 20a25c95d..21dc4f5f0 100644 --- a/src/files.c +++ b/src/files.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 files.c $NHDT-Date: 1717449127 2024/06/03 21:12:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.399 $ */ +/* NetHack 3.7 files.c $NHDT-Date: 1737346561 2025/01/19 20:16:01 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.416 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -348,7 +348,6 @@ fname_decode(char quotechar, char *s, char *callerbuf, int bufsz) sp = s; op = callerbuf; *op = '\0'; - calc = 0; while (*sp) { /* Do we have room for one more character? */ @@ -1096,6 +1095,7 @@ create_savefile(void) nhfp->mode = WRITING; if (program_state.in_self_recover || do_historical) { do_historical = TRUE; /* force it */ + nhUse(do_historical); nhfp->structlevel = TRUE; nhfp->fieldlevel = FALSE; nhfp->addinfo = FALSE; @@ -1150,6 +1150,7 @@ open_savefile(void) nhfp->mode = READING; if (program_state.in_self_recover || do_historical) { do_historical = TRUE; /* force it */ + nhUse(do_historical); nhfp->structlevel = TRUE; nhfp->fieldlevel = FALSE; nhfp->addinfo = FALSE;