mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	output: fix maybe-uninitialized warning
GCC is complaining about a maybe-uninitialized variable when doing a release build. Even if that can't actually happen because all enum values are handled, add an abort call to silence the warning.
This commit is contained in:
		
							parent
							
								
									83c1ba7783
								
							
						
					
					
						commit
						0281b58d2f
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -480,12 +480,13 @@ static void output_pending_resolution(struct wlr_output *output, int *width,
 | 
			
		|||
		case WLR_OUTPUT_STATE_MODE_FIXED:
 | 
			
		||||
			*width = output->pending.mode->width;
 | 
			
		||||
			*height = output->pending.mode->height;
 | 
			
		||||
			break;
 | 
			
		||||
			return;
 | 
			
		||||
		case WLR_OUTPUT_STATE_MODE_CUSTOM:
 | 
			
		||||
			*width = output->pending.custom_mode.width;
 | 
			
		||||
			*height = output->pending.custom_mode.height;
 | 
			
		||||
			break;
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
		abort();
 | 
			
		||||
	} else {
 | 
			
		||||
		*width = output->width;
 | 
			
		||||
		*height = output->height;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue