mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Merge pull request #5137 from mikesinouye/assert
Allow reading of gzipped files when not in NDEBUG
This commit is contained in:
		
						commit
						4f33cc52db
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -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());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue