Skip to content

Commit c30842f

Browse files
cppcheck, reduce variable scope
1 parent f1f1e5b commit c30842f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpputest-for-qpcpp-lib/src/cms_cpputest_qf_ctrl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ void Teardown()
101101

102102
QF::stop();
103103

104-
bool leakDetected = false;
105-
106104
// No test should complete with allocated events sitting
107105
// in a memory pool.
108106
if (l_pubSubEventMemPoolConfigs != nullptr) {
107+
bool leakDetected = false;
108+
109109
if (l_memPoolOption == MemPoolTeardownOption::CHECK_FOR_LEAKS) {
110110
for (size_t i = 0; i < l_pubSubEventMemPoolConfigs->size(); ++i) {
111111

0 commit comments

Comments
 (0)