From 7d744d1c11dfc65984a0db250fe87e1fd0a707ef Mon Sep 17 00:00:00 2001 From: boeschf <48126478+boeschf@users.noreply.github.com> Date: Tue, 25 Oct 2022 10:04:56 +0200 Subject: [PATCH] fix compiler warnings (#2006) --- modcc/procinliner.cpp | 2 +- test/unit/test_segment_tree.cpp | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/modcc/procinliner.cpp b/modcc/procinliner.cpp index 9b3f1526..a478e353 100644 --- a/modcc/procinliner.cpp +++ b/modcc/procinliner.cpp @@ -111,7 +111,7 @@ void ProcedureInliner::visit(BinaryExpression* e) { void ProcedureInliner::visit(AssignmentExpression* e) { // If we're inlining a call, take care of variable renaming if (state_ == state::Running) { - if (auto lhs = e->lhs()->is_identifier()) { + if (e->lhs()->is_identifier()) { e->replace_lhs(substitute(e->lhs(), local_arg_map_)); } if (e->rhs()->is_identifier()) { diff --git a/test/unit/test_segment_tree.cpp b/test/unit/test_segment_tree.cpp index f70492d7..7875db33 100644 --- a/test/unit/test_segment_tree.cpp +++ b/test/unit/test_segment_tree.cpp @@ -169,12 +169,13 @@ TEST(segment_tree, split) { EXPECT_THROW(arb::split_at(t, arb::mnpos), arb::arbor_exception); EXPECT_THROW(arb::split_at(t, 1), arb::arbor_exception); } - // gnarly tree - // (npos) - 0 - 1 - 4 - // \ - // 2 - 3 - // \ - // 5 + /* gnarly tree + ** (npos) - 0 - 1 - 4 + ** \ + ** 2 - 3 + ** \ + ** 5 + */ // NB: Splitting _will_ re-order segments. So we have to be careful when // building values to compare against. { @@ -275,12 +276,13 @@ TEST(segment_tree, join) { EXPECT_THROW(arb::split_at(t, arb::mnpos), arb::arbor_exception); EXPECT_THROW(arb::split_at(t, 1), arb::arbor_exception); } - // gnarly tree - // (npos) - 0 - 1 - 4 - // \ - // 2 - 3 - // \ - // 5 + /* gnarly tree + ** (npos) - 0 - 1 - 4 + ** \ + ** 2 - 3 + ** \ + ** 5 + */ // NB: Joining _will_ re-order segments. So we have to be careful when // building values to compare against. { -- GitLab