Fix -Wunused-private-field issues with clang
Provide dummy accessors for private values that are set in initializers, but not actually used. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
This commit is contained in:
		@@ -982,6 +982,8 @@ class Unprintable {
 | 
			
		||||
  Unprintable() : c_('a') {}
 | 
			
		||||
 | 
			
		||||
  bool operator==(const Unprintable& /* rhs */) const { return true; }
 | 
			
		||||
  // -Wunused-private-field: dummy accessor for `c_`.
 | 
			
		||||
  char dummy_c() { return c_; }
 | 
			
		||||
 private:
 | 
			
		||||
  char c_;
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user