From 04039407e6308070c148de0d5e93640ec1b0a341 Mon Sep 17 00:00:00 2001 From: Mathias Preiner Date: Thu, 5 Mar 2020 11:42:54 -0800 Subject: Enable -Wshadow and fix warnings. (#3909) Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally. Co-authored-by: Clark Barrett Co-authored-by: Andres Noetzli Co-authored-by: Aina Niemetz Co-authored-by: Alex Ozdemir Co-authored-by: makaimann Co-authored-by: yoni206 Co-authored-by: Andrew Reynolds Co-authored-by: AleksandarZeljic Co-authored-by: Caleb Donovick Co-authored-by: Amalee Co-authored-by: Scott Kovach Co-authored-by: ntsis --- src/main/driver_unified.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) (limited to 'src/main/driver_unified.cpp') diff --git a/src/main/driver_unified.cpp b/src/main/driver_unified.cpp index c4800a3ac..b999fe4b0 100644 --- a/src/main/driver_unified.cpp +++ b/src/main/driver_unified.cpp @@ -324,13 +324,14 @@ int runCvc4(int argc, char* argv[], Options& opts) { if (interrupted) break; for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { - Command* cmd = allCommands[i][j]->clone(); - cmd->setMuted(true); - pExecutor->doCommand(cmd); - if(cmd->interrupted()) { + Command* ccmd = allCommands[i][j]->clone(); + ccmd->setMuted(true); + pExecutor->doCommand(ccmd); + if (ccmd->interrupted()) + { interrupted = true; } - delete cmd; + delete ccmd; } } needReset = 0; @@ -350,13 +351,14 @@ int runCvc4(int argc, char* argv[], Options& opts) { for(size_t i = 0; i < allCommands.size() && !interrupted; ++i) { for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { - Command* cmd = allCommands[i][j]->clone(); - cmd->setMuted(true); - pExecutor->doCommand(cmd); - if(cmd->interrupted()) { + Command* ccmd = allCommands[i][j]->clone(); + ccmd->setMuted(true); + pExecutor->doCommand(ccmd); + if (ccmd->interrupted()) + { interrupted = true; } - delete cmd; + delete ccmd; } } if (interrupted) continue; @@ -376,13 +378,14 @@ int runCvc4(int argc, char* argv[], Options& opts) { for(size_t i = 0; i < allCommands.size() && !interrupted; ++i) { for(size_t j = 0; j < allCommands[i].size() && !interrupted; ++j) { - Command* cmd = allCommands[i][j]->clone(); - cmd->setMuted(true); - pExecutor->doCommand(cmd); - if(cmd->interrupted()) { + Command* ccmd = allCommands[i][j]->clone(); + ccmd->setMuted(true); + pExecutor->doCommand(ccmd); + if (ccmd->interrupted()) + { interrupted = true; } - delete cmd; + delete ccmd; } } needReset = 0; -- cgit v1.2.3