analyzer lint for sys/unix/*.c sys/share/*.c win/tty/*.c

Actually only ioctl.c for sys/share.  And with all of these, only
for the conditionals used by MacOS.
This commit is contained in:
PatR
2025-01-23 12:01:46 -08:00
parent bac7cd7365
commit 29f7580fc1
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 pmatchregex.c $NHDT-Date: 1596498285 2020/08/03 23:44:45 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.4 $ */ /* NetHack 3.7 pmatchregex.c $NHDT-Date: 1737691300 2025/01/23 20:01:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.10 $ */
/* Copyright (c) Sean Hunt 2015. */ /* Copyright (c) Sean Hunt 2015. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -59,11 +59,11 @@ regex_match(const char *s, struct nhregex *re)
void void
regex_free(struct nhregex *re) regex_free(struct nhregex *re)
{ {
if (re) { assert(re != NULL); /* regex_free() is declared with NONNULLPTR1 */
if (re->pat)
free((genericptr_t) re->pat); if (re->pat)
free((genericptr_t) re); free((genericptr_t) re->pat);
} free((genericptr_t) re);
} }
/*pmatchregex.c*/ /*pmatchregex.c*/
+2 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.7 wintty.c $NHDT-Date: 1717967340 2024/06/09 21:09:00 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.410 $ */ /* NetHack 3.7 wintty.c $NHDT-Date: 1737691300 2025/01/23 20:01:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.420 $ */
/* Copyright (c) David Cohrs, 1991 */ /* Copyright (c) David Cohrs, 1991 */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -5107,7 +5107,7 @@ render_status(void)
if (hpbar_crit_hp) if (hpbar_crit_hp)
repad_with_dashes(bar); repad_with_dashes(bar);
bar_len = (int) strlen(bar); /* always 30 */ bar_len = (int) strlen(bar); /* always 30 */
tlth = bar_len + 2; /*tlth = bar_len + 2; // not needed within this 'if'*/
attrmask = 0; /* for the second part only case: dead */ attrmask = 0; /* for the second part only case: dead */
/* when at full HP, the whole title will be highlighted; /* when at full HP, the whole title will be highlighted;
when injured or dead, there will be a second portion when injured or dead, there will be a second portion