Calls like `debug("something\n", 0, 0, 0, 0)` cause clang warnings,
because debug() is a macro that passes its arguments to printf(), and
clang warns about extra 0s to printf().  Silence the warnings by
hiding the printf() in a new function do_debug().  The code still
passes extra 0s to printf(), but clang can't warn.
Macros debug() and verbose() should use C99 __VA_ARGS__, so they don't
require the extra 0s; but ACK doesn't use __VA_ARGS__ yet.
Adjust some format strings for debug() or fatal(), or cast their
arguments, to match their types.  I don't know whether uint32_t is
unsigned int or unsigned long, so I cast it to unsigned long, and
print it with "%lx".
In util/led/sym.c, #include "save.h" to declare savechar(), and use
parentheses to silence a clang warning in hash().
		
	
			
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			346 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			346 B
		
	
	
	
		
			C
		
	
	
	
	
	
/*
 | 
						|
 * error.h
 | 
						|
 *
 | 
						|
 *  Created on: 2018-11-17
 | 
						|
 *      Author: carl
 | 
						|
 */
 | 
						|
 | 
						|
 | 
						|
#ifndef __ERROR_H_INCLUDED__
 | 
						|
#define __ERROR_H_INCLUDED__
 | 
						|
 | 
						|
void stop(void);
 | 
						|
void fatal(char *format, ...);
 | 
						|
void warning(char *format, ...);
 | 
						|
void error(char *format, ...);
 | 
						|
int do_debug(char *format, ...);
 | 
						|
int do_verbose(char *format, ...);
 | 
						|
 | 
						|
 | 
						|
#endif /* __ERROR_H_INCLUDED__ */
 |