aboutsummaryrefslogtreecommitdiff
path: root/palisade.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-06-16 19:03:56 +0100
committerSimon Tatham <anakin@pobox.com>2023-06-16 19:04:50 +0100
commitc82537b4574d45aa16e50b7f8dc1f075cfdb69f9 (patch)
treef830b661a3e20d4d1ec996d4e1a3880615261da1 /palisade.c
parentde13ca2874e673b426efcf04f734ae6625635396 (diff)
downloadpuzzles-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 'palisade.c')
-rw-r--r--palisade.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/palisade.c b/palisade.c
index 67fb9a1..83b5983 100644
--- a/palisade.c
+++ b/palisade.c
@@ -634,8 +634,6 @@ static char *new_game_desc(const game_params *params, random_state *rs,
DSF *dsf = NULL;
int i, r, c;
- int attempts = 0;
-
for (i = 0; i < wh; ++i) shuf[i] = i;
xshuffle(shuf, wh, rs);
@@ -646,7 +644,6 @@ static char *new_game_desc(const game_params *params, random_state *rs,
soln[wh] = '\0';
do {
- ++attempts;
setmem(soln, '@', wh);
dsf_free(dsf);