mirror of
				https://git.tukaani.org/xz.git
				synced 2025-11-03 23:12:57 +00:00 
			
		
		
		
	xz: list: suppress -Wformat-nonliteral for Solaris
Solaris' GCC can't understand that our use is fine, unlike modern compilers: ``` list.c: In function 'print_totals_basic': list.c:1191:4: error: format not a string literal, argument types not checked [-Werror=format-nonliteral] uint64_to_str(totals.files, 0)); ^~~~~~~~~~~~~ cc1: all warnings being treated as errors ``` It's presumably because of older gettext missing format attributes. This is with `gcc (GCC) 7.3.0`. (cherry picked from commit b69768c8bd1a34fde311935c551d061ba52d9a3f)
This commit is contained in:
		
							parent
							
								
									7ce2ac795a
								
							
						
					
					
						commit
						dc6b6011b4
					
				@ -1178,6 +1178,10 @@ print_totals_basic(void)
 | 
				
			|||||||
				totals.uncompressed_size),
 | 
									totals.uncompressed_size),
 | 
				
			||||||
			checks);
 | 
								checks);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if defined(__sun) && (defined(__GNUC__) || defined(__clang__))
 | 
				
			||||||
 | 
					#       pragma GCC diagnostic push
 | 
				
			||||||
 | 
					#       pragma GCC diagnostic ignored "-Wformat-nonliteral"
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
	// Since we print totals only when there are at least two files,
 | 
						// Since we print totals only when there are at least two files,
 | 
				
			||||||
	// the English message will always use "%s files". But some other
 | 
						// the English message will always use "%s files". But some other
 | 
				
			||||||
	// languages need different forms for different plurals so we
 | 
						// languages need different forms for different plurals so we
 | 
				
			||||||
@ -1189,6 +1193,9 @@ print_totals_basic(void)
 | 
				
			|||||||
			totals.files <= ULONG_MAX ? totals.files
 | 
								totals.files <= ULONG_MAX ? totals.files
 | 
				
			||||||
				: (totals.files % 1000000) + 1000000),
 | 
									: (totals.files % 1000000) + 1000000),
 | 
				
			||||||
			uint64_to_str(totals.files, 0));
 | 
								uint64_to_str(totals.files, 0));
 | 
				
			||||||
 | 
					#if defined(__sun) && (defined(__GNUC__) || defined(__clang__))
 | 
				
			||||||
 | 
					#       pragma GCC diagnostic pop
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return;
 | 
						return;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user