From: nhmall Date: Sun, 9 Oct 2022 13:35:24 +0000 (-0400) Subject: warning fix in msdos build X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ab2860718912f0a928c70993941886eba209633;p=nethack warning fix in msdos build ../sys/msdos/font.c:24:12: warning: declaration of 'flags' shadows a global declaration [-Wshadow] 24 | uint32 flags; | ^~~~~ In file included from ../include/hack.h:285, from ../sys/msdos/font.c:3: ../include/flag.h:422:29: note: shadowed declaration is here 422 | extern NEARDATA struct flag flags; | ^~~~~ make[2]: Entering directory '/home/nhmall/git/NHsource/util' --- diff --git a/sys/msdos/font.c b/sys/msdos/font.c index d7fd72046..8a4471d51 100755 --- a/sys/msdos/font.c +++ b/sys/msdos/font.c @@ -21,7 +21,7 @@ load_font(const char *filename) uint32 magic; uint32 version; uint32 headersize; - uint32 flags; + uint32 fontflags; uint32 length; uint32 charsize; uint32 height; @@ -43,7 +43,7 @@ load_font(const char *filename) if (version != 0) goto error; headersize = read_u32(header + 8); if (headersize < sizeof(header)) goto error; - flags = read_u32(header + 12); + fontflags = read_u32(header + 12); length = read_u32(header + 16); charsize = read_u32(header + 20); height = read_u32(header + 24); @@ -77,7 +77,7 @@ load_font(const char *filename) fseek(fp, charsize - memsize, SEEK_CUR); } - if (flags & 0x01) { + if (fontflags & 0x01) { /* Read the Unicode table */ char buf[128], buf2[128+1]; unsigned bufsize, strsize;