mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	Merge pull request #4721 from ldoolitt/main
kernel/drivertools.h: avoid maybe-uninitialized compile warnings
This commit is contained in:
		
						commit
						1717a0b9c0
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -364,7 +364,7 @@ public:
 | 
			
		|||
 | 
			
		||||
	unsigned int hash() const
 | 
			
		||||
	{
 | 
			
		||||
		unsigned int inner;
 | 
			
		||||
		unsigned int inner = 0;
 | 
			
		||||
		switch (type_)
 | 
			
		||||
		{
 | 
			
		||||
			case DriveType::NONE:
 | 
			
		||||
| 
						 | 
				
			
			@ -385,6 +385,9 @@ public:
 | 
			
		|||
			case DriveType::MULTIPLE:
 | 
			
		||||
				inner = multiple_.hash();
 | 
			
		||||
				break;
 | 
			
		||||
			default:
 | 
			
		||||
				log_abort();
 | 
			
		||||
				break;
 | 
			
		||||
		}
 | 
			
		||||
		return mkhash((unsigned int)type_, inner);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			@ -912,7 +915,7 @@ public:
 | 
			
		|||
 | 
			
		||||
	unsigned int hash() const
 | 
			
		||||
	{
 | 
			
		||||
		unsigned int inner;
 | 
			
		||||
		unsigned int inner = 0;
 | 
			
		||||
		switch (type_)
 | 
			
		||||
		{
 | 
			
		||||
			case DriveType::NONE:
 | 
			
		||||
| 
						 | 
				
			
			@ -933,6 +936,9 @@ public:
 | 
			
		|||
			case DriveType::MULTIPLE:
 | 
			
		||||
				inner = multiple_.hash();
 | 
			
		||||
				break;
 | 
			
		||||
			default:
 | 
			
		||||
				log_abort();
 | 
			
		||||
				break;
 | 
			
		||||
		}
 | 
			
		||||
		return mkhash((unsigned int)type_, inner);
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue