From d58d49bb031a5baaddfa52946961c695bc1c09ec Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Fri, 13 Jan 2023 17:01:34 +0100 Subject: [PATCH 1/2] [RECONSTRUCTION] [CLANG] Fixes warnings reported by clang 14 --- CommonTools/Utils/test/testExpressionParser.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CommonTools/Utils/test/testExpressionParser.cc b/CommonTools/Utils/test/testExpressionParser.cc index d180136415ee3..69956c8f4b294 100644 --- a/CommonTools/Utils/test/testExpressionParser.cc +++ b/CommonTools/Utils/test/testExpressionParser.cc @@ -264,10 +264,9 @@ void testExpressionParser::checkAll() { std::cout << "Check for leaks in the " << (b ? "Lazy" : "standard") << " string parser" << std::endl; expr.reset(); reco::parser::expressionParser("triggerObjectMatchesByPath('HLT_Something').size()", expr, b); - double res = 0; for (size_t i = 0; i < 10 * 1000; ++i) { for (size_t j = 0; j < 100; ++j) { - res += expr->value(o); + expr->value(o); break; } break; From bb287eb163265d101cdfcc9b0cde5bbd4ea5c81b Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Tue, 31 Jan 2023 10:18:49 +0100 Subject: [PATCH 2/2] code cleanup: remove unnecessary code --- CommonTools/Utils/test/testExpressionParser.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/CommonTools/Utils/test/testExpressionParser.cc b/CommonTools/Utils/test/testExpressionParser.cc index 69956c8f4b294..29d26c3ef3dfa 100644 --- a/CommonTools/Utils/test/testExpressionParser.cc +++ b/CommonTools/Utils/test/testExpressionParser.cc @@ -264,15 +264,7 @@ void testExpressionParser::checkAll() { std::cout << "Check for leaks in the " << (b ? "Lazy" : "standard") << " string parser" << std::endl; expr.reset(); reco::parser::expressionParser("triggerObjectMatchesByPath('HLT_Something').size()", expr, b); - for (size_t i = 0; i < 10 * 1000; ++i) { - for (size_t j = 0; j < 100; ++j) { - expr->value(o); - break; - } - break; - if (i % 1000 == 999) - std::cout << "iter " << i << std::endl; - } + expr->value(o); } } reco::CandidatePtrVector ptrOverlaps;