From 1ae2f0adef19abe53ccc86192f86fd5b6e84a348 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 28 Jan 2024 13:58:32 -0500 Subject: [PATCH] 'n_iterations' was no longer used after commit 45c2d96dbd8. Before then, we just checked it with an assert() to verify that we weren't going into some sort of endless loop. The assert() seems like a reasonable idea, and I could imagine needing the number of iterations at some point, and... without the assert, gcc can complain of an unused variable. So, reverting. --- elem_out.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/elem_out.cpp b/elem_out.cpp index 57c0f5c4..e7bb22cc 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -4170,6 +4170,7 @@ static void improve_mpc_colors( const int n_obs, const OBSERVE FAR *obs, assert( color >=0 && color < max_n_colors); } n_iterations++; + assert( n_iterations < 10); } }