mirror of
https://github.com/YosysHQ/yosys
synced 2025-05-06 07:15:48 +00:00
Fixes for some of clang scan-build detected issues
This commit is contained in:
parent
956c4e485a
commit
6574553189
15 changed files with 39 additions and 23 deletions
|
@ -531,10 +531,11 @@ void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<s
|
|||
std::ifstream *ff = new std::ifstream;
|
||||
ff->open(filename.c_str(), bin_input ? std::ifstream::binary : std::ifstream::in);
|
||||
yosys_input_files.insert(filename);
|
||||
if (ff->fail())
|
||||
if (ff->fail()) {
|
||||
delete ff;
|
||||
else
|
||||
f = ff;
|
||||
ff = nullptr;
|
||||
}
|
||||
f = ff;
|
||||
if (f != NULL) {
|
||||
// Check for gzip magic
|
||||
unsigned char magic[3];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue