Address a bunch of dead store issues found by the static analyzer.

Pretty much all of these fall into one of two categories:

* Variables that are obviously unneeded and in many cases completely unused – probably remnants of old code that was rewritten. These ones were deleted.

* Variables that look like they should be used but aren't. These ones have been suppressed, with a TODO message added as a reminder to investigate them in more detail later.
This commit is contained in:
2024-08-10 12:22:05 -04:00
parent 1d491e3b2a
commit f400a5b7de
12 changed files with 28 additions and 35 deletions

View File

@@ -72,7 +72,7 @@ void force_town_enter(short which_town,location where_start) {
//short entry_dir; // if 9, go to forced
void start_town_mode(short which_town, short entry_dir) {
short town_number;
short at_which_save_slot,former_town;
short former_town;
bool monsters_loaded = false,town_toast = false;
location loc;
bool play_town_sound = false;
@@ -143,8 +143,6 @@ void start_town_mode(short which_town, short entry_dir) {
univ.town.monst.which_town = town_number;
univ.town.monst.hostile = false;
at_which_save_slot = univ.party.at_which_save_slot;
for(auto& pop : univ.party.creature_save)
if(town_number == pop.which_town) {
univ.town.monst = pop;
@@ -1306,12 +1304,10 @@ void draw_map(bool need_refresh) {
rectangle area_to_draw_from,area_to_draw_on = {29,47,269,287};
ter_num_t what_ter;
bool draw_surroundings = false,expl;
bool expl;
short total_size = 48; // if full redraw, use this to figure out everything
rectangle custom_from;
draw_surroundings = true;
town_map_adj.x = 0;
town_map_adj.y = 0;