mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Merge pull request #3629 from YosysHQ/micko/clang_fixes
Fixes for some of clang scan-build detected issues
This commit is contained in:
		
						commit
						245884a101
					
				
					 15 changed files with 39 additions and 23 deletions
				
			
		| 
						 | 
				
			
			@ -197,7 +197,7 @@ static void reconstruct_clb_attimes(void *user_data, uint64_t pnt_time, fstHandl
 | 
			
		|||
 | 
			
		||||
void FstData::reconstruct_callback_attimes(uint64_t pnt_time, fstHandle pnt_facidx, const unsigned char *pnt_value, uint32_t /* plen */)
 | 
			
		||||
{
 | 
			
		||||
	if (pnt_time > end_time) return;
 | 
			
		||||
	if (pnt_time > end_time || !pnt_value) return;
 | 
			
		||||
	// if we are past the timestamp
 | 
			
		||||
	bool is_clock = false;
 | 
			
		||||
	if (!all_samples) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -469,8 +469,8 @@ std::string make_temp_dir(std::string template_str)
 | 
			
		|||
#  endif
 | 
			
		||||
 | 
			
		||||
	char *p = strdup(template_str.c_str());
 | 
			
		||||
	p = mkdtemp(p);
 | 
			
		||||
	log_assert(p != NULL);
 | 
			
		||||
	char *res = mkdtemp(p);
 | 
			
		||||
	log_assert(res != NULL);
 | 
			
		||||
	template_str = p;
 | 
			
		||||
	free(p);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue