Initialize roots_output to fix -Wmaybe-uninitialized
With -O2:
../rootston/desktop.c: In function ‘desktop_surface_at’:
../rootston/desktop.c:714:18: error: ‘roots_output’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if ((surface = layer_surface_at(roots_output,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      &roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ox, oy, sx, sy))) {
      ~~~~~~~~~~~~~~~
			
			
This commit is contained in:
		
							parent
							
								
									8ed0e9f343
								
							
						
					
					
						commit
						3f6823092a
					
				| 
						 | 
				
			
			@ -682,7 +682,7 @@ struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop,
 | 
			
		|||
	struct wlr_surface *surface = NULL;
 | 
			
		||||
	struct wlr_output *wlr_output =
 | 
			
		||||
		wlr_output_layout_output_at(desktop->layout, lx, ly);
 | 
			
		||||
	struct roots_output *roots_output;
 | 
			
		||||
	struct roots_output *roots_output = NULL;
 | 
			
		||||
	double ox = lx, oy = ly;
 | 
			
		||||
	*view = NULL;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue