diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-06-16 19:03:56 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-06-16 19:04:50 +0100 |
| commit | c82537b4574d45aa16e50b7f8dc1f075cfdb69f9 (patch) | |
| tree | f830b661a3e20d4d1ec996d4e1a3880615261da1 /undead.c | |
| parent | de13ca2874e673b426efcf04f734ae6625635396 (diff) | |
| download | puzzles-c82537b4574d45aa16e50b7f8dc1f075cfdb69f9.zip puzzles-c82537b4574d45aa16e50b7f8dc1f075cfdb69f9.tar.gz puzzles-c82537b4574d45aa16e50b7f8dc1f075cfdb69f9.tar.bz2 puzzles-c82537b4574d45aa16e50b7f8dc1f075cfdb69f9.tar.xz | |
Fix some unused-variable warnings.
A test-build with a modern clang points out a number of 'set but not
used' variables, which clang seems to have got better at recently.
In cases where there's conditioned-out or commented-out code using the
variable, I've left it in and added a warning-suppressing cast to
void. Otherwise I've just deleted the variables.
Diffstat (limited to 'undead.c')
| -rw-r--r-- | undead.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -976,7 +976,7 @@ static int path_cmp(const void *a, const void *b) { static char *new_game_desc(const game_params *params, random_state *rs, char **aux, bool interactive) { - int i,count,c,w,h,r,p,g; + int count,c,w,h,r,p,g; game_state *new; /* Variables for puzzle generation algorithm */ @@ -997,7 +997,6 @@ static char *new_game_desc(const game_params *params, random_state *rs, char *e; char *desc; - i = 0; while (true) { new = new_state(params); abort = false; @@ -1257,7 +1256,6 @@ static char *new_game_desc(const game_params *params, random_state *rs, * difficulty level, free memory and start from scratch */ sfree(old_guess); free_game(new); - i++; } /* We have a valid puzzle! */ @@ -1578,6 +1576,8 @@ static char *solve_game(const game_state *state_start, const game_state *currsta } /* printf("Puzzle solved at level %s, iterations %d, ambiguous %d\n", (solved_bruteforce ? "TRICKY" : "NORMAL"), iterative_depth, count_ambiguous); */ + (void)iterative_depth; + (void)count_ambiguous; move = snewn(solve_state->common->num_total * 4 +2, char); c = move; |