fix(3p/nix): Fix all remaining compiler warnings
This compiles under `-Wall -Werror`. The largest chunk of this change is `final` qualifiers for the various Nix CLI command structs, which inherit from a Command class that has more virtual functions than are implemented by each command. Change-Id: I0925e6e1a39013f026773db5816e4a77d50f3b4a Reviewed-on: https://cl.tvl.fyi/c/depot/+/1294 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: kanepyork <rikingcoding@gmail.com>
This commit is contained in:
		
							parent
							
								
									ca50fb66d2
								
							
						
					
					
						commit
						15afa8472e
					
				
					 33 changed files with 66 additions and 39 deletions
				
			
		
							
								
								
									
										7
									
								
								third_party/nix/src/libutil/util.hh
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								third_party/nix/src/libutil/util.hh
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -390,6 +390,11 @@ class Callback {
 | 
			
		|||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
// The unused-variable assert is disabled in this block because the
 | 
			
		||||
// `prev` variables are only used in debug mode (in the asserts).
 | 
			
		||||
#pragma clang diagnostic push
 | 
			
		||||
#pragma clang diagnostic ignored "-Wunused-variable"
 | 
			
		||||
 | 
			
		||||
  void operator()(T&& t) noexcept {
 | 
			
		||||
    auto prev = done.test_and_set();
 | 
			
		||||
    assert(!prev);
 | 
			
		||||
| 
						 | 
				
			
			@ -406,6 +411,8 @@ class Callback {
 | 
			
		|||
    promise.set_exception(exc);
 | 
			
		||||
    fun(promise.get_future());
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
#pragma clang diagnostic pop
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* Start a thread that handles various signals. Also block those signals
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue