From ebb9d3d4dcb9ed25cde703aa5a343c33bab071c3 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 21 Jun 2022 18:43:45 -0600 Subject: [PATCH] fix optimized unused variable warning --- libs/surfaces/us2400/strip.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/surfaces/us2400/strip.cc b/libs/surfaces/us2400/strip.cc index be88ff3092..6dfa7a9933 100644 --- a/libs/surfaces/us2400/strip.cc +++ b/libs/surfaces/us2400/strip.cc @@ -112,7 +112,10 @@ Strip::Strip (Surface& s, const std::string& name, int index, const map::const_iterator b = strip_buttons.begin(); b != strip_buttons.end(); ++b) { - Button* bb = dynamic_cast (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this)); +#ifndef NDEBUG + Button* bb = dynamic_cast +#endif + (Button::factory (*_surface, b->first, b->second.base_id + index, b->second.name, *this)); DEBUG_TRACE (DEBUG::US2400, string_compose ("surface %1 strip %2 new button BID %3 id %4 from base %5\n", _surface->number(), index, Button::id_to_name (bb->bid()), bb->id(), b->second.base_id));