From 9fe2c0dcf18e9831749b21522ed19417b3bd560e Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Wed, 23 Aug 2023 09:20:28 -0800 Subject: [PATCH] Fix -Wunused-but-set-variable warnings from Clang --- 3d-models.cpp | 6 +----- barriers.cpp | 3 --- earcut.hpp | 3 --- rulegen3.cpp | 5 +---- 4 files changed, 2 insertions(+), 15 deletions(-) diff --git a/3d-models.cpp b/3d-models.cpp index 5bc741f56..6633d31d3 100644 --- a/3d-models.cpp +++ b/3d-models.cpp @@ -548,8 +548,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push, auto gbody = body; - int it = 0; - vector nextid(n); vector lastid(n); vector stillin(n, true); @@ -558,7 +556,6 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push, nextid[n-1] = n-1; lastid[0] = 0; while(true) { - it++; int cand = -1; ld cv = 0; for(int i=1; i pss; @@ -801,7 +798,6 @@ void geometry_information::adjust_eye(hpcshape& eye, hpcshape head, ld shift_eye for(int i=0; i& ad, int j, cell *c) { auto ad1 = currentmap->get_cellshape(c).dirdist[j]; int a = 0; for(auto& dd: ad1) if(dd == 1) a++; - - int a0 = 0; - for(auto& dd: ad) if(dd == 1) a0++; return a < 6; } diff --git a/earcut.hpp b/earcut.hpp index 8b3de301a..1caf8b43e 100644 --- a/earcut.hpp +++ b/earcut.hpp @@ -280,11 +280,8 @@ void Earcut::earcutLinked(Node* ear, int pass) { Node* prev; Node* next; - int iterations = 0; - // iterate through ears, slicing them one by one while (ear->prev != ear->next) { - iterations++; prev = ear->prev; next = ear->next; diff --git a/rulegen3.cpp b/rulegen3.cpp index 5dd5f4ae3..eb0640c7e 100644 --- a/rulegen3.cpp +++ b/rulegen3.cpp @@ -1288,9 +1288,6 @@ EX void test_transducers() { swap(cum, result); ctid = t_origin[ctid].at->cmove(c)->id; } - int err = 0; - for(auto duc: cum) for(auto p: duc.second.t) - if(p.first.first == ENDED || p.first.second != p.first.first) err++; throw_identity_errors(cum, cyc.dirs); if(id_size != isize(cum)) println(hlog, "error: identity not recovered correctly"); } @@ -1761,4 +1758,4 @@ auto hook3 = addHook(hooks_args, 100, readRuleArgs3); EX } #endif -} \ No newline at end of file +}