From bab6c5cbdd762213635771d31d03b202c037f194 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 11 Aug 2021 18:14:37 -0600 Subject: [PATCH] triggbox: clean up compiler warnings --- libs/ardour/triggerbox.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index b36436cb2b..728b5a3da8 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -801,7 +801,6 @@ TriggerBox::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp Temporal::Beats end_beats (end.beats()); Temporal::TempoMap::SharedPtr tmap (Temporal::TempoMap::use()); size_t max_chans = 0; - Trigger::RunResult rr; bool first = false; /* Now actually run all currently active triggers */ @@ -892,7 +891,7 @@ TriggerBox::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp int nxt = trigger.next_trigger(); - if (nxt >= 0 && nxt < all_triggers.size() && !all_triggers[nxt]->active()) { + if (nxt >= 0 && (size_t) nxt < all_triggers.size() && !all_triggers[nxt]->active()) { DEBUG_TRACE (DEBUG::Triggers, string_compose ("%1 switching to %2\n", trigger.index(), nxt)); /* start it up */ all_triggers[nxt]->bang (); @@ -983,9 +982,9 @@ TriggerBox::set_next_trigger (size_t current) } break; case Trigger::LastTrigger: - for (n = all_triggers.size() - 1; n >= 0; --n) { - if (all_triggers[n]->region() && !all_triggers[n]->active ()) { - all_triggers[current]->set_next_trigger (n); + for (int i = all_triggers.size() - 1; i >= 0; --i) { + if (all_triggers[i]->region() && !all_triggers[i]->active ()) { + all_triggers[current]->set_next_trigger (i); return; } }