aboutsummaryrefslogtreecommitdiff
path: root/towers.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2011-05-04 18:22:14 +0000
committerSimon Tatham <anakin@pobox.com>2011-05-04 18:22:14 +0000
commit2efc77d2fde7e53604f8490b57f18a36eec5c4fb (patch)
tree46b5441958cc8525ccd09f43c36dea9d0ea57d4c /towers.c
parent4bab5e531b4b49c9b41d2140dd570d05947e7c40 (diff)
downloadpuzzles-2efc77d2fde7e53604f8490b57f18a36eec5c4fb.zip
puzzles-2efc77d2fde7e53604f8490b57f18a36eec5c4fb.tar.gz
puzzles-2efc77d2fde7e53604f8490b57f18a36eec5c4fb.tar.bz2
puzzles-2efc77d2fde7e53604f8490b57f18a36eec5c4fb.tar.xz
Fix warnings generated by gcc 4.6.0 about variables set but not
thereafter read. Most of these changes are just removal of pointless stuff or trivial reorganisations; one change is actually substantive, and fixes a bug in Keen's clue selection (the variable 'bad' was unreferenced not because I shouldn't have set it, but because I _should_ have referenced it!). [originally from svn r9164]
Diffstat (limited to 'towers.c')
-rw-r--r--towers.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/towers.c b/towers.c
index 7beaf87..94ed1a7 100644
--- a/towers.c
+++ b/towers.c
@@ -1225,14 +1225,13 @@ static int check_errors(game_state *state, int *errors)
}
for (i = 0; i < 4*w; i++) {
- int start, step, j, k, n, best;
+ int start, step, j, n, best;
STARTSTEP(start, step, i, w);
if (!clues[i])
continue;
best = n = 0;
- k = 0;
for (j = 0; j < w; j++) {
int number = grid[start+j*step];
if (!number)