more warning bits
This commit is contained in:
@@ -115,6 +115,7 @@ struct obj {
|
|||||||
#define leashmon corpsenm /* gets m_id of attached pet */
|
#define leashmon corpsenm /* gets m_id of attached pet */
|
||||||
#define fromsink corpsenm /* a potion from a sink */
|
#define fromsink corpsenm /* a potion from a sink */
|
||||||
#define novelidx corpsenm /* 3.6 tribute - the index of the novel title */
|
#define novelidx corpsenm /* 3.6 tribute - the index of the novel title */
|
||||||
|
#define migr_species corpsenm /* species to endow for MIGR_TO_SPECIES */
|
||||||
int usecount; /* overloaded for various things that tally */
|
int usecount; /* overloaded for various things that tally */
|
||||||
#define spestudied usecount /* # of times a spellbook has been studied */
|
#define spestudied usecount /* # of times a spellbook has been studied */
|
||||||
unsigned oeaten; /* nutrition left in food, if partly eaten */
|
unsigned oeaten; /* nutrition left in food, if partly eaten */
|
||||||
|
|||||||
@@ -2075,17 +2075,15 @@ int x, y, a, b, c;
|
|||||||
/* Return the wall mode for a T wall. */
|
/* Return the wall mode for a T wall. */
|
||||||
static int
|
static int
|
||||||
set_twall(x0, y0, x1, y1, x2, y2, x3, y3)
|
set_twall(x0, y0, x1, y1, x2, y2, x3, y3)
|
||||||
|
#ifdef WA_VERBOSE
|
||||||
int x0, y0; /* used #if WA_VERBOSE */
|
int x0, y0; /* used #if WA_VERBOSE */
|
||||||
|
#else
|
||||||
|
int x0, y0 UNUSED;
|
||||||
|
#endif
|
||||||
int x1, y1, x2, y2, x3, y3;
|
int x1, y1, x2, y2, x3, y3;
|
||||||
{
|
{
|
||||||
int wmode, is_1, is_2, is_3;
|
int wmode, is_1, is_2, is_3;
|
||||||
|
|
||||||
#ifndef WA_VERBOSE
|
|
||||||
/* non-verbose more_than_one() doesn't use these */
|
|
||||||
nhUse(x0);
|
|
||||||
nhUse(y0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@@ -1708,7 +1708,8 @@ unsigned long deliverflags;
|
|||||||
if ((where & MIGR_TO_SPECIES) == 0)
|
if ((where & MIGR_TO_SPECIES) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((mtmp->data->mflags2 & DELIVER_PM) == otmp->corpsenm) {
|
if (otmp->migr_species != NON_PM
|
||||||
|
&& (mtmp->data->mflags2 & DELIVER_PM) == (unsigned) otmp->migr_species) {
|
||||||
obj_extract_self(otmp);
|
obj_extract_self(otmp);
|
||||||
otmp->owornmask = 0L;
|
otmp->owornmask = 0L;
|
||||||
otmp->ox = otmp->oy = 0;
|
otmp->ox = otmp->oy = 0;
|
||||||
@@ -1725,7 +1726,7 @@ unsigned long deliverflags;
|
|||||||
}
|
}
|
||||||
free_oname(otmp);
|
free_oname(otmp);
|
||||||
}
|
}
|
||||||
otmp->corpsenm = NON_PM;
|
otmp->migr_species = NON_PM;
|
||||||
(void) add_to_minv(mtmp, otmp);
|
(void) add_to_minv(mtmp, otmp);
|
||||||
cnt++;
|
cnt++;
|
||||||
if (maxobj && cnt >= maxobj)
|
if (maxobj && cnt >= maxobj)
|
||||||
|
|||||||
@@ -1884,11 +1884,14 @@ register const char *let, *word;
|
|||||||
void
|
void
|
||||||
silly_thing(word, otmp)
|
silly_thing(word, otmp)
|
||||||
const char *word;
|
const char *word;
|
||||||
|
#ifdef OBSOLETE_HANDLING
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
{
|
|
||||||
#if 1 /* 'P','R' vs 'W','T' handling is obsolete */
|
|
||||||
nhUse(otmp);
|
|
||||||
#else
|
#else
|
||||||
|
struct obj *otmp UNUSED;
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#ifdef OBSOLETE_HANDLING
|
||||||
|
/* 'P','R' vs 'W','T' handling is obsolete */
|
||||||
const char *s1, *s2, *s3;
|
const char *s1, *s2, *s3;
|
||||||
int ocls = otmp->oclass, otyp = otmp->otyp;
|
int ocls = otmp->oclass, otyp = otmp->otyp;
|
||||||
|
|
||||||
|
|||||||
12
src/mdlib.c
12
src/mdlib.c
@@ -60,7 +60,6 @@ static char *FDECL(version_string, (char *, const char *));
|
|||||||
static char *FDECL(version_id_string, (char *, const char *));
|
static char *FDECL(version_id_string, (char *, const char *));
|
||||||
static char *FDECL(bannerc_string, (char *, const char *));
|
static char *FDECL(bannerc_string, (char *, const char *));
|
||||||
|
|
||||||
static int FDECL(case_insensitive_comp, (const char *, const char *));
|
|
||||||
static void NDECL(make_version);
|
static void NDECL(make_version);
|
||||||
static char *FDECL(eos, (char *));
|
static char *FDECL(eos, (char *));
|
||||||
#if 0
|
#if 0
|
||||||
@@ -74,6 +73,11 @@ static int FDECL(mkstemp, (char *));
|
|||||||
#endif
|
#endif
|
||||||
#endif /* MAKEDEFS_C || FOR_RUNTIME */
|
#endif /* MAKEDEFS_C || FOR_RUNTIME */
|
||||||
|
|
||||||
|
#if defined(MAKEDEFS_C) || defined(FOR_RUNTIME) || defined(WIN32) \
|
||||||
|
|| (defined(CROSSCOMPILE_TARGET) && defined(__DATE__) && defined(__TIME__))
|
||||||
|
static int FDECL(case_insensitive_comp, (const char *, const char *));
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(MAKEDEFS_C) && defined(WIN32)
|
#if !defined(MAKEDEFS_C) && defined(WIN32)
|
||||||
extern int GUILaunched;
|
extern int GUILaunched;
|
||||||
#endif
|
#endif
|
||||||
@@ -88,7 +92,10 @@ static void FDECL(opt_out_words, (char *, int *));
|
|||||||
static void NDECL(build_savebones_compat_string);
|
static void NDECL(build_savebones_compat_string);
|
||||||
static int idxopttext, done_runtime_opt_init_once = 0;
|
static int idxopttext, done_runtime_opt_init_once = 0;
|
||||||
#define MAXOPT 40
|
#define MAXOPT 40
|
||||||
|
#if !defined(MAKEDEFS_C) && defined(CROSSCOMPILE_TARGET) \
|
||||||
|
&& defined(__DATE__) && defined(__TIME__)
|
||||||
static char rttimebuf[MAXOPT];
|
static char rttimebuf[MAXOPT];
|
||||||
|
#endif
|
||||||
static char *opttext[120] = { 0 };
|
static char *opttext[120] = { 0 };
|
||||||
char optbuf[BUFSZ];
|
char optbuf[BUFSZ];
|
||||||
static struct version_info version;
|
static struct version_info version;
|
||||||
@@ -348,6 +355,8 @@ char *template;
|
|||||||
#endif /* HAS_NO_MKSTEMP */
|
#endif /* HAS_NO_MKSTEMP */
|
||||||
#endif /* MAKEDEFS_C || FOR_RUNTIME */
|
#endif /* MAKEDEFS_C || FOR_RUNTIME */
|
||||||
|
|
||||||
|
#if defined(MAKEDEFS_C) || defined(FOR_RUNTIME) || defined(WIN32) \
|
||||||
|
|| (defined(CROSSCOMPILE_TARGET) && defined(__DATE__) && defined(__TIME__))
|
||||||
static int
|
static int
|
||||||
case_insensitive_comp(s1, s2)
|
case_insensitive_comp(s1, s2)
|
||||||
const char *s1;
|
const char *s1;
|
||||||
@@ -367,6 +376,7 @@ const char *s2;
|
|||||||
}
|
}
|
||||||
return u1 - u2;
|
return u1 - u2;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
eos(str)
|
eos(str)
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ boolean init, artif;
|
|||||||
otmp = mksobj(otyp, init, artif);
|
otmp = mksobj(otyp, init, artif);
|
||||||
add_to_migration(otmp);
|
add_to_migration(otmp);
|
||||||
otmp->owornmask = (long) MIGR_TO_SPECIES;
|
otmp->owornmask = (long) MIGR_TO_SPECIES;
|
||||||
otmp->corpsenm = mflags2;
|
otmp->migr_species = mflags2;
|
||||||
return otmp;
|
return otmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -304,7 +304,10 @@ register char *opts;
|
|||||||
boolean tinitial, tfrom_file;
|
boolean tinitial, tfrom_file;
|
||||||
{
|
{
|
||||||
char *op;
|
char *op;
|
||||||
boolean negated, got_match = FALSE, has_val = FALSE;
|
boolean negated, got_match = FALSE;
|
||||||
|
#if 0
|
||||||
|
boolean has_val = FALSE;
|
||||||
|
#endif
|
||||||
int i, matchidx = -1, optresult = optn_err, optlen, optlen_wo_val;
|
int i, matchidx = -1, optresult = optn_err, optlen, optlen_wo_val;
|
||||||
boolean retval = TRUE;
|
boolean retval = TRUE;
|
||||||
|
|
||||||
@@ -345,11 +348,16 @@ boolean tinitial, tfrom_file;
|
|||||||
optlen = (int) strlen(opts);
|
optlen = (int) strlen(opts);
|
||||||
optlen_wo_val = length_without_val(opts, optlen);
|
optlen_wo_val = length_without_val(opts, optlen);
|
||||||
if (optlen_wo_val < optlen) {
|
if (optlen_wo_val < optlen) {
|
||||||
|
#if 0
|
||||||
has_val = TRUE;
|
has_val = TRUE;
|
||||||
|
#endif
|
||||||
optlen = optlen_wo_val;
|
optlen = optlen_wo_val;
|
||||||
} else {
|
}
|
||||||
|
#if 0
|
||||||
|
else {
|
||||||
has_val = FALSE;
|
has_val = FALSE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; i < OPTCOUNT; ++i) {
|
for (i = 0; i < OPTCOUNT; ++i) {
|
||||||
got_match = FALSE;
|
got_match = FALSE;
|
||||||
|
|||||||
@@ -954,7 +954,11 @@ struct cemetery **cemeteryaddr;
|
|||||||
static void
|
static void
|
||||||
rest_levl(nhfp, rlecomp)
|
rest_levl(nhfp, rlecomp)
|
||||||
NHFILE *nhfp;
|
NHFILE *nhfp;
|
||||||
|
#ifdef RLECOMP
|
||||||
boolean rlecomp;
|
boolean rlecomp;
|
||||||
|
#else
|
||||||
|
boolean rlecomp UNUSED;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef RLECOMP
|
#ifdef RLECOMP
|
||||||
short i, j;
|
short i, j;
|
||||||
@@ -984,9 +988,7 @@ boolean rlecomp;
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#else /* !RLECOMP */
|
#endif /* RLECOMP */
|
||||||
nhUse(rlecomp);
|
|
||||||
#endif /* ?RLECOMP */
|
|
||||||
if (nhfp->structlevel) {
|
if (nhfp->structlevel) {
|
||||||
mread(nhfp->fd, (genericptr_t) levl, sizeof levl);
|
mread(nhfp->fd, (genericptr_t) levl, sizeof levl);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3076,7 +3076,7 @@ lua_State *L;
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
find_montype(L, s)
|
find_montype(L, s)
|
||||||
lua_State *L;
|
lua_State *L UNUSED;
|
||||||
const char *s;
|
const char *s;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -3084,7 +3084,6 @@ const char *s;
|
|||||||
for (i = LOW_PM; i < NUMMONS; i++)
|
for (i = LOW_PM; i < NUMMONS; i++)
|
||||||
if (!strcmpi(mons[i].mname, s))
|
if (!strcmpi(mons[i].mname, s))
|
||||||
return i;
|
return i;
|
||||||
nhUse(L);
|
|
||||||
return NON_PM;
|
return NON_PM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ extern const struct attack c_sa_no[NATTK];
|
|||||||
|
|
||||||
void
|
void
|
||||||
sysopt_seduce_set(val)
|
sysopt_seduce_set(val)
|
||||||
|
#if 0
|
||||||
int val;
|
int val;
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
/*
|
/*
|
||||||
* Attack substitution is now done on the fly in getmattk(mhitu.c).
|
* Attack substitution is now done on the fly in getmattk(mhitu.c).
|
||||||
*/
|
*/
|
||||||
@@ -144,8 +144,9 @@ int val;
|
|||||||
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
mons[PM_SUCCUBUS].mattk[x] = setval[x];
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
nhUse(val);
|
int val UNUSED;
|
||||||
#endif /*0*/
|
{
|
||||||
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3592,7 +3592,11 @@ tty_nhgetch()
|
|||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
int
|
int
|
||||||
tty_nh_poskey(x, y, mod)
|
tty_nh_poskey(x, y, mod)
|
||||||
|
#if defined(WIN32CON)
|
||||||
int *x, *y, *mod;
|
int *x, *y, *mod;
|
||||||
|
#else
|
||||||
|
int *x UNUSED, *y UNUSED, *mod UNUSED;
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -3612,10 +3616,6 @@ int *x, *y, *mod;
|
|||||||
if (ttyDisplay && ttyDisplay->toplin == 1)
|
if (ttyDisplay && ttyDisplay->toplin == 1)
|
||||||
ttyDisplay->toplin = 2;
|
ttyDisplay->toplin = 2;
|
||||||
#else /* !WIN32CON */
|
#else /* !WIN32CON */
|
||||||
nhUse(x);
|
|
||||||
nhUse(y);
|
|
||||||
nhUse(mod);
|
|
||||||
|
|
||||||
i = tty_nhgetch();
|
i = tty_nhgetch();
|
||||||
#endif /* ?WIN32CON */
|
#endif /* ?WIN32CON */
|
||||||
return i;
|
return i;
|
||||||
|
|||||||
Reference in New Issue
Block a user