From dbced097ac16973f648ad2f024cc2302fa187578 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 18 Feb 2023 07:06:27 +0000 Subject: Fix unused variable warnings from clang. If you enable -DSTRICT=ON in cmake and also build with clang, it reports a couple of variables set but not otherwise used. One was genuinely unused ('loop_found' in loop_deductions in Loopy); the other is used by debug statements that are usually but not always compiled out. --- lightup.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lightup.c') diff --git a/lightup.c b/lightup.c index 854d28a..3db47f7 100644 --- a/lightup.c +++ b/lightup.c @@ -416,6 +416,8 @@ static void debug_state(game_state *state) int x, y; char c = '?'; + (void)c; /* placate -Wunused-but-set-variable if debug() does nothing */ + for (y = 0; y < state->h; y++) { for (x = 0; x < state->w; x++) { c = '.'; -- cgit v1.1