more lint (trunk only)

The one `anything any' that was triggering a warning was shadowing
another `anything any' in the same function; no need to rename it, just
remove the unnecessary declaration.  Also, mark the couple of arrays with
initializers that I'd noticed as static instead of letting them default
to auto.  The abil_to_spfx()::abil2spfx[] one might need to be redone in
code as a switch if some compilers/linkers have trouble initializing it.
This commit is contained in:
nethack.rankin
2008-02-20 01:26:13 +00:00
parent 9de7d5530f
commit ac63f2bb6f
3 changed files with 14 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)botl.c 3.5 2003/11/22 */
/* SCCS Id: @(#)botl.c 3.5 2008/02/19 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1155,7 +1155,7 @@ clridx_to_s(buf, idx)
char *buf;
int idx;
{
const char *a[] = {"bold", "inverse", "normal"};
static const char *a[] = { "bold", "inverse", "normal" };
if (buf) {
buf[0] = '\0';
@@ -1392,7 +1392,7 @@ int fldidx,thresholdtype;
int behavior, under, over;
anything threshold;
{
return;
}
# endif /* STATUS_HILITES */