summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2013-03-15 10:29:25 +0100
committerClifford Wolf <clifford@clifford.at>2013-03-15 10:29:25 +0100
commit35b4a2c553557b7b012edabf1bab805c74bd7892 (patch)
tree8bd3cfacb738dab8e6b080b99328020138392b16
parentcd5767d61ba31e8990db0913b6a08f2563c49565 (diff)
Fixed gcc warnings and added error handling to shell escape
-rw-r--r--kernel/register.cc4
-rw-r--r--passes/scc/scc.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/kernel/register.cc b/kernel/register.cc
index 5c9b40cd..ebb834c8 100644
--- a/kernel/register.cc
+++ b/kernel/register.cc
@@ -142,7 +142,9 @@ void Pass::call(RTLIL::Design *design, std::string command)
while (p >= s && (*p == '\r' || *p == '\n'))
*(p--) = 0;
log_header("Shell command: %s\n", s);
- system(s);
+ int retCode = system(s);
+ if (retCode != 0)
+ log_cmd_error("Shell command returned error code %d.\n", retCode);
return;
}
for (char *p = strtok_r(s, " \t\r\n", &saveptr); p; p = strtok_r(NULL, " \t\r\n", &saveptr)) {
diff --git a/passes/scc/scc.cc b/passes/scc/scc.cc
index e665fd09..0dde3cbe 100644
--- a/passes/scc/scc.cc
+++ b/passes/scc/scc.cc
@@ -73,6 +73,7 @@ struct SccWorker
}
if (cellLabels[cell].first == cellLabels[cell].second)
+ {
if (cellStack.back() == cell)
{
cellStack.pop_back();
@@ -93,6 +94,7 @@ struct SccWorker
sccList.push_back(scc);
log("\n");
}
+ }
}
SccWorker(RTLIL::Design *design, RTLIL::Module *module, bool allCellTypes, int maxDepth) : design(design), module(module), sigmap(module)