mirror of https://github.com/YosysHQ/yosys.git
Fixed gcc warnings and added error handling to shell escape
This commit is contained in:
parent
cd5767d61b
commit
35b4a2c553
|
@ -142,7 +142,9 @@ void Pass::call(RTLIL::Design *design, std::string command)
|
||||||
while (p >= s && (*p == '\r' || *p == '\n'))
|
while (p >= s && (*p == '\r' || *p == '\n'))
|
||||||
*(p--) = 0;
|
*(p--) = 0;
|
||||||
log_header("Shell command: %s\n", s);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
for (char *p = strtok_r(s, " \t\r\n", &saveptr); p; p = strtok_r(NULL, " \t\r\n", &saveptr)) {
|
for (char *p = strtok_r(s, " \t\r\n", &saveptr); p; p = strtok_r(NULL, " \t\r\n", &saveptr)) {
|
||||||
|
|
|
@ -73,6 +73,7 @@ struct SccWorker
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cellLabels[cell].first == cellLabels[cell].second)
|
if (cellLabels[cell].first == cellLabels[cell].second)
|
||||||
|
{
|
||||||
if (cellStack.back() == cell)
|
if (cellStack.back() == cell)
|
||||||
{
|
{
|
||||||
cellStack.pop_back();
|
cellStack.pop_back();
|
||||||
|
@ -93,6 +94,7 @@ struct SccWorker
|
||||||
sccList.push_back(scc);
|
sccList.push_back(scc);
|
||||||
log("\n");
|
log("\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SccWorker(RTLIL::Design *design, RTLIL::Module *module, bool allCellTypes, int maxDepth) : design(design), module(module), sigmap(module)
|
SccWorker(RTLIL::Design *design, RTLIL::Module *module, bool allCellTypes, int maxDepth) : design(design), module(module), sigmap(module)
|
||||||
|
|
Loading…
Reference in New Issue