mirror of
				https://github.com/eledio-devices/thirdparty-littlefs.git
				synced 2025-10-31 08:42:40 +01:00 
			
		
		
		
	__VA_ARGS__ are frustrating in C. Even for their main purpose (printf), they fall short in that they don't have a _portable_ way to have zero arguments after the format string in a printf call. Even if we detect compilers and use ##__VA_ARGS__ where available, GCC emits a warning with -pedantic that is _impossible_ to explicitly disable. This commit contains the best solution we can think of. A bit of indirection that adds a hidden "%s" % "" to the end of the format string. This solution does not work everywhere as it has a runtime cost, but it is hopefully ok for debug statements.
		
			
				
	
	
	
		
			6.9 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			6.9 KiB