diff --git a/src/allmain.c b/src/allmain.c index 9e40a6a91..9f8430dbd 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -26,9 +26,15 @@ staticfn void debug_fields(const char *); staticfn void dump_enums(void); #endif +#ifdef CRASHREPORT +#define USED_FOR_CRASHREPORT +#else +#define USED_FOR_CRASHREPORT UNUSED +#endif + /*ARGSUSED*/ void -early_init(int argc UNUSED, char *argv[] UNUSED) +early_init(int argc USED_FOR_CRASHREPORT, char *argv[] USED_FOR_CRASHREPORT) { #ifdef CRASHREPORT /* Do this as early as possible, but let ports do other things first. */ diff --git a/src/botl.c b/src/botl.c index c5ff5156e..07579358a 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1370,7 +1370,7 @@ evaluate_and_notify_windowport( boolean *valsetlist, int idx) { - int i, fld, updated = 0, notpresent UNUSED = 0; + int i, fld, updated = 0; /* * Now pass the changed values to window port. @@ -1384,7 +1384,6 @@ evaluate_and_notify_windowport( || ((fld == BL_XP || i == BL_EXP) && Upolyd) || ((fld == BL_VERS) && !flags.showvers) ) { - notpresent++; continue; } if (eval_notify_windowport_field(fld, valsetlist, idx)) diff --git a/src/invent.c b/src/invent.c index baee7a1c1..9cd06a2e4 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2048,11 +2048,7 @@ DISABLE_WARNING_FORMAT_NONLITERAL void silly_thing(const char *word, -#ifdef OBSOLETE_HANDLING struct obj *otmp) -#else - struct obj *otmp UNUSED) -#endif { #ifdef OBSOLETE_HANDLING /* 'P','R' vs 'W','T' handling is obsolete */ diff --git a/src/music.c b/src/music.c index 65d153b9f..ce4510321 100644 --- a/src/music.c +++ b/src/music.c @@ -487,7 +487,7 @@ do_improvisation(struct obj *instr) struct obj itmp; boolean mundane = FALSE, same_old_song = FALSE; static char my_goto_song[] = {'C', '\0'}, - *improvisation SOUNDLIBONLY = my_goto_song; + *improvisation = my_goto_song; itmp = *instr; itmp.oextra = (struct oextra *) 0; /* ok on this copy as instr maintains @@ -706,6 +706,7 @@ do_improvisation(struct obj *instr) impossible("What a weird instrument (%d)!", instr->otyp); return 0; } + nhUse(improvisation); return 2; /* That takes time */ } diff --git a/src/options.c b/src/options.c index d631ca3f1..ccd541fed 100644 --- a/src/options.c +++ b/src/options.c @@ -1970,7 +1970,7 @@ optfn_map_mode(int optidx, int req, boolean negated, char *opts, char *op) /* all the key assignment options for menu_* commands are identical but optlist.h treats them as distinct rather than sharing one */ staticfn int -shared_menu_optfn(int optidx UNUSED, int req, boolean negated UNUSED, +shared_menu_optfn(int optidx UNUSED, int req, boolean negated, char *opts, char *op) { if (req == do_init) { @@ -3969,7 +3969,7 @@ extern const char *const known_restrictions[]; /* symbols.c */ staticfn int optfn_symset( - int optidx UNUSED, + int optidx, int req, boolean negated UNUSED, char *opts, @@ -8621,7 +8621,7 @@ doset(void) /* changing options via menu by Per Liboriussen */ (void) parseoptions(buf, setinitial, fromfile); } else { /* compound option */ - int k = opt_indx, reslt UNUSED; + int k = opt_indx, reslt; if (allopt[k].has_handler && allopt[k].optfn) { reslt = (*allopt[k].optfn)(allopt[k].idx, do_handler, diff --git a/src/sp_lev.c b/src/sp_lev.c index 8ea15c0d7..444407e63 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -5890,7 +5890,7 @@ lspo_wallify(lua_State *L) /* reset_level is only needed for testing purposes */ int -lspo_reset_level(lua_State *L UNUSED) +lspo_reset_level(lua_State *L) { boolean wtower = In_W_tower(u.ux, u.uy, &u.uz); @@ -5906,7 +5906,7 @@ lspo_reset_level(lua_State *L UNUSED) /* finalize_level is only needed for testing purposes */ int -lspo_finalize_level(lua_State *L UNUSED) +lspo_finalize_level(lua_State *L) { boolean wtower = In_W_tower(u.ux, u.uy, &u.uz); int i; diff --git a/src/uhitm.c b/src/uhitm.c index 3c01e7258..2fdb59841 100644 --- a/src/uhitm.c +++ b/src/uhitm.c @@ -3724,7 +3724,7 @@ mhitm_ad_pest( void mhitm_ad_deth( struct monst *magr, - struct attack *mattk UNUSED, + struct attack *mattk, struct monst *mdef, struct mhitm_data *mhm) { struct permonst *pd = mdef->data; @@ -3831,7 +3831,7 @@ do_stone_u(struct monst *mtmp) void do_stone_mon( struct monst *magr, - struct attack *mattk UNUSED, + struct attack *mattk, struct monst *mdef, struct mhitm_data *mhm) { struct permonst *pd = mdef->data; diff --git a/util/makedefs.c b/util/makedefs.c index d9ce2225b..9e58c3832 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -2176,7 +2176,7 @@ macronamelimit(char *name, int pref) void do_objs(void) { - int i, sum UNUSED = 0; + int i /*, sum = 0 */; char *c, *objnam; int nspell = 0; int prefix = 0; @@ -2216,7 +2216,7 @@ do_objs(void) } #endif /*0*/ class = objects[i].oc_class; - sum = 0; + /* sum = 0; */ } for (c = objnam; *c; c++) @@ -2289,7 +2289,7 @@ do_objs(void) Fprintf(ofp, "%s\t%d\n", macronamelimit(objnam, prefix), i); prefix = 0; - sum += objects[i].oc_prob; + /* sum += objects[i].oc_prob; */ if (sumerr) break; diff --git a/win/curses/cursinit.c b/win/curses/cursinit.c index 9b2380bb4..196a56c18 100644 --- a/win/curses/cursinit.c +++ b/win/curses/cursinit.c @@ -99,7 +99,7 @@ set_window_position(int *winx, int *winy, int *winw, int *winh, void curses_create_main_windows(void) { - int min_message_height UNUSED = 1; + /* int min_message_height = 1; */ int message_orientation = 0; int status_orientation = 0; int border_space = 0; @@ -133,7 +133,7 @@ curses_create_main_windows(void) } if ((term_cols - border_space) < COLNO) { - min_message_height++; + /* min_message_height++; */ } /* Determine status window orientation */ diff --git a/win/curses/cursstat.c b/win/curses/cursstat.c index 3f53fd103..c7258d6b9 100644 --- a/win/curses/cursstat.c +++ b/win/curses/cursstat.c @@ -301,7 +301,7 @@ draw_horizontal(boolean border) cap_and_hunger, exp_points, sho_score, sho_vers, /* both height and width get their values set, * but only width gets used in this function */ - height UNUSED, width, w, xtra, clen, x, y, t, ex, ey, + height, width, w, xtra, clen, x, y, t, ex, ey, condstart = 0, conddummy = 0, versstart = 0; #ifdef STATUS_HILITES int coloridx = NO_COLOR, attrmask = 0; @@ -672,6 +672,7 @@ draw_horizontal(boolean border) } /* i (fld) */ wclrtoeol(win); /* [superfluous? draw_status() calls werase()] */ } /* j (line) */ + nhUse(height); return; }