trickier lint cleanup
Suppress some mostly longstanding "unused parameter" warnings where the usage was generally conditional. restlevl() had a conditional closing brace that confused the recent reformat, resulting in some code inside a funciton ending up flush against the left border (first column, that is, as if outside of the function).
This commit is contained in:
+6
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 display.c $NHDT-Date: 1432512771 2015/05/25 00:12:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.53 $ */
|
/* NetHack 3.6 display.c $NHDT-Date: 1432536528 2015/05/25 06:48:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.54 $ */
|
||||||
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
|
||||||
/* and Dave Cohrs, 1990. */
|
/* and Dave Cohrs, 1990. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1766,10 +1766,14 @@ int x, y, a, b, c;
|
|||||||
/* Return the wall mode for a T wall. */
|
/* Return the wall mode for a T wall. */
|
||||||
STATIC_OVL int
|
STATIC_OVL int
|
||||||
set_twall(x0, y0, x1, y1, x2, y2, x3, y3)
|
set_twall(x0, y0, x1, y1, x2, y2, x3, y3)
|
||||||
int x0, y0, x1, y1, x2, y2, x3, y3;
|
int x0, y0; /* used #if WA_VERBOSE */
|
||||||
|
int x1, y1, x2, y2, x3, y3;
|
||||||
{
|
{
|
||||||
int wmode, is_1, is_2, is_3;
|
int wmode, is_1, is_2, is_3;
|
||||||
|
|
||||||
|
nhUse(x0);
|
||||||
|
nhUse(y0);
|
||||||
|
|
||||||
is_1 = check_pos(x1, y1, WM_T_LONG);
|
is_1 = check_pos(x1, y1, WM_T_LONG);
|
||||||
is_2 = check_pos(x2, y2, WM_T_BL);
|
is_2 = check_pos(x2, y2, WM_T_BL);
|
||||||
is_3 = check_pos(x3, y3, WM_T_BR);
|
is_3 = check_pos(x3, y3, WM_T_BR);
|
||||||
|
|||||||
+23
-25
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 restore.c $NHDT-Date: 1432512772 2015/05/25 00:12:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.98 $ */
|
/* NetHack 3.6 restore.c $NHDT-Date: 1432536531 2015/05/25 06:48:51 $ $NHDT-Branch: master $:$NHDT-Revision: 1.99 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -698,17 +698,18 @@ unsigned int stuckid, steedid;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/ /* fd used in MFLOPPY only */
|
/*ARGSUSED*/
|
||||||
STATIC_OVL int restlevelfile(fd, ltmp) register int fd;
|
STATIC_OVL int
|
||||||
|
restlevelfile(fd, ltmp)
|
||||||
|
int fd; /* fd used in MFLOPPY only */
|
||||||
xchar ltmp;
|
xchar ltmp;
|
||||||
#if defined(macintosh) && (defined(__SC__) || defined(__MRC__)) \
|
|
||||||
&& !defined(MFLOPPY)
|
|
||||||
#pragma unused(fd)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
register int nfd;
|
int nfd;
|
||||||
char whynot[BUFSZ];
|
char whynot[BUFSZ];
|
||||||
|
|
||||||
|
#ifndef MFLOPPY
|
||||||
|
nhUse(fd);
|
||||||
|
#endif
|
||||||
nfd = create_levelfile(ltmp, whynot);
|
nfd = create_levelfile(ltmp, whynot);
|
||||||
if (nfd < 0) {
|
if (nfd < 0) {
|
||||||
/* BUG: should suppress any attempt to write a panic
|
/* BUG: should suppress any attempt to write a panic
|
||||||
@@ -727,7 +728,7 @@ xchar ltmp;
|
|||||||
(void) nhclose(nfd);
|
(void) nhclose(nfd);
|
||||||
#ifdef AMIGA
|
#ifdef AMIGA
|
||||||
clearlocks();
|
clearlocks();
|
||||||
#else
|
#else /* !AMIGA */
|
||||||
eraseall(levels, alllevels);
|
eraseall(levels, alllevels);
|
||||||
eraseall(levels, allbones);
|
eraseall(levels, allbones);
|
||||||
|
|
||||||
@@ -743,19 +744,16 @@ xchar ltmp;
|
|||||||
(void) lseek(fd, (off_t) 0, 0);
|
(void) lseek(fd, (off_t) 0, 0);
|
||||||
(void) validate(fd, (char *) 0); /* skip version etc */
|
(void) validate(fd, (char *) 0); /* skip version etc */
|
||||||
return dorecover(fd); /* 0 or 1 */
|
return dorecover(fd); /* 0 or 1 */
|
||||||
} else {
|
}
|
||||||
#endif
|
#endif /* ?AMIGA */
|
||||||
pline("Be seeing you...");
|
pline("Be seeing you...");
|
||||||
terminate(EXIT_SUCCESS);
|
terminate(EXIT_SUCCESS);
|
||||||
#ifndef AMIGA
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* MFLOPPY */
|
||||||
}
|
bufon(nfd);
|
||||||
#endif
|
savelev(nfd, ltmp, WRITE_SAVE | FREE_SAVE);
|
||||||
bufon(nfd);
|
bclose(nfd);
|
||||||
savelev(nfd, ltmp, WRITE_SAVE | FREE_SAVE);
|
return 2;
|
||||||
bclose(nfd);
|
|
||||||
return (2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -933,10 +931,7 @@ boolean rlecomp;
|
|||||||
struct rm r;
|
struct rm r;
|
||||||
|
|
||||||
if (rlecomp) {
|
if (rlecomp) {
|
||||||
#if defined(MAC)
|
|
||||||
/* Suppress warning about used before set */
|
|
||||||
(void) memset((genericptr_t) &r, 0, sizeof(r));
|
(void) memset((genericptr_t) &r, 0, sizeof(r));
|
||||||
#endif
|
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
j = 0;
|
||||||
len = 0;
|
len = 0;
|
||||||
@@ -954,9 +949,12 @@ boolean rlecomp;
|
|||||||
j = 0;
|
j = 0;
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
} else
|
return;
|
||||||
#endif /* RLECOMP */
|
}
|
||||||
mread(fd, (genericptr_t) levl, sizeof(levl));
|
#else /* !RLECOMP */
|
||||||
|
nhUse(rlecomp);
|
||||||
|
#endif /* ?RLECOMP */
|
||||||
|
mread(fd, (genericptr_t) levl, sizeof levl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
+7
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 save.c $NHDT-Date: 1432512768 2015/05/25 00:12:48 $ $NHDT-Branch: master $:$NHDT-Revision: 1.87 $ */
|
/* NetHack 3.6 save.c $NHDT-Date: 1432536532 2015/05/25 06:48:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.88 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -591,9 +591,12 @@ boolean rlecomp;
|
|||||||
bwrite(fd, (genericptr_t) &match, sizeof(uchar));
|
bwrite(fd, (genericptr_t) &match, sizeof(uchar));
|
||||||
bwrite(fd, (genericptr_t) rgrm, sizeof(struct rm));
|
bwrite(fd, (genericptr_t) rgrm, sizeof(struct rm));
|
||||||
}
|
}
|
||||||
} else
|
return;
|
||||||
#endif /* RLECOMP */
|
}
|
||||||
bwrite(fd, (genericptr_t) levl, sizeof(levl));
|
#else /* !RLECOMP */
|
||||||
|
nhUse(rlecomp);
|
||||||
|
#endif /* ?RLECOMP */
|
||||||
|
bwrite(fd, (genericptr_t) levl, sizeof levl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.57 $ */
|
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1432536532 2015/05/25 06:48:52 $ $NHDT-Branch: master $:$NHDT-Revision: 1.58 $ */
|
||||||
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
/* Copyright (c) 1989 by Jean-Christophe Collet */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2772,7 +2772,7 @@ struct sp_coder *coder;
|
|||||||
/*ARGUSED*/
|
/*ARGUSED*/
|
||||||
void
|
void
|
||||||
spo_end_moninvent(coder)
|
spo_end_moninvent(coder)
|
||||||
struct sp_coder *coder;
|
struct sp_coder *coder UNUSED;
|
||||||
{
|
{
|
||||||
if (invent_carrying_monster)
|
if (invent_carrying_monster)
|
||||||
m_dowear(invent_carrying_monster, TRUE);
|
m_dowear(invent_carrying_monster, TRUE);
|
||||||
@@ -2782,7 +2782,7 @@ struct sp_coder *coder;
|
|||||||
/*ARGUSED*/
|
/*ARGUSED*/
|
||||||
void
|
void
|
||||||
spo_pop_container(coder)
|
spo_pop_container(coder)
|
||||||
struct sp_coder *coder;
|
struct sp_coder *coder UNUSED;
|
||||||
{
|
{
|
||||||
if (container_idx > 0) {
|
if (container_idx > 0) {
|
||||||
container_idx--;
|
container_idx--;
|
||||||
@@ -4487,7 +4487,7 @@ struct sp_coder *coder;
|
|||||||
void
|
void
|
||||||
sel_set_wallify(x, y, arg)
|
sel_set_wallify(x, y, arg)
|
||||||
int x, y;
|
int x, y;
|
||||||
genericptr_t arg;
|
genericptr_t arg UNUSED;
|
||||||
{
|
{
|
||||||
wallify_map(x, y, x, y);
|
wallify_map(x, y, x, y);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 wintty.c $NHDT-Date: 1432512813 2015/05/25 00:13:33 $ $NHDT-Branch: master $:$NHDT-Revision: 1.93 $ */
|
/* NetHack 3.6 wintty.c $NHDT-Date: 1432536533 2015/05/25 06:48:53 $ $NHDT-Branch: master $:$NHDT-Revision: 1.94 $ */
|
||||||
/* 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. */
|
||||||
|
|
||||||
@@ -2980,9 +2980,13 @@ int *x, *y, *mod;
|
|||||||
if (ttyDisplay && ttyDisplay->toplin == 1)
|
if (ttyDisplay && ttyDisplay->toplin == 1)
|
||||||
ttyDisplay->toplin = 2;
|
ttyDisplay->toplin = 2;
|
||||||
return i;
|
return i;
|
||||||
#else
|
#else /* !WIN32CON */
|
||||||
|
nhUse(x);
|
||||||
|
nhUse(y);
|
||||||
|
nhUse(mod);
|
||||||
|
|
||||||
return tty_nhgetch();
|
return tty_nhgetch();
|
||||||
#endif
|
#endif /* ?WIN32CON */
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user