From c82537b4574d45aa16e50b7f8dc1f075cfdb69f9 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 16 Jun 2023 19:03:56 +0100 Subject: 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. --- samegame.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'samegame.c') diff --git a/samegame.c b/samegame.c index 5e79115..4eacc90 100644 --- a/samegame.c +++ b/samegame.c @@ -865,6 +865,8 @@ static void gen_grid(int w, int h, int nc, int *grid, random_state *rs) #if defined GENERATION_DIAGNOSTICS || defined COUNT_FAILURES printf("%d failures\n", failures); +#else + (void)failures; #endif #ifdef GENERATION_DIAGNOSTICS { -- cgit v1.1