From 4958759740d892a990a4666d7dc0a1904c98250e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 7 Jul 2023 18:10:47 +0200 Subject: [PATCH] Silence an annoying unreachable out of bounds warning Signed-off-by: falkTX --- include/engine/Port.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/engine/Port.hpp b/include/engine/Port.hpp index 748e71fc..c28549b3 100644 --- a/include/engine/Port.hpp +++ b/include/engine/Port.hpp @@ -198,6 +198,8 @@ struct Port { } // Set higher channel voltages to 0 for (int c = channels; c < this->channels; c++) { + if (c >= PORT_MAX_CHANNELS) + __builtin_unreachable(); voltages[c] = 0.f; } // Don't allow caller to set port as disconnected