3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-12 17:06:15 +00:00

Merge pull request #5137 from mikesinouye/assert

Allow reading of gzipped files when not in NDEBUG
This commit is contained in:
Emil J 2025-05-22 10:39:48 +02:00 committed by GitHub
commit 4f33cc52db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -127,7 +127,8 @@ std::istream* uncompressed(const std::string filename, std::ios_base::openmode m
filename.c_str(), unsigned(magic[2]));
gzip_istream* s = new gzip_istream();
delete f;
log_assert(s->open(filename.c_str()));
bool ok = s->open(filename.c_str());
log_assert(ok && "Failed to open gzipped file.\n");
return s;
#else
log_cmd_error("File `%s' is a gzip file, but Yosys is compiled without zlib.\n", filename.c_str());