mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	add printf checking
This commit is contained in:
		
							parent
							
								
									49dae17dfb
								
							
						
					
					
						commit
						6e6b5588f4
					
				
					 2 changed files with 8 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -107,6 +107,12 @@ typedef void (*SpaNotify) (void *data);
 | 
			
		|||
#define SPA_TIMESPEC_TO_TIME(ts) ((ts)->tv_sec * SPA_NSEC_PER_SEC + (ts)->tv_nsec)
 | 
			
		||||
#define SPA_TIMEVAL_TO_TIME(tv)  ((tv)->tv_sec * SPA_NSEC_PER_SEC + (tv)->tv_usec * 1000ll)
 | 
			
		||||
 | 
			
		||||
#ifdef __GNUC__
 | 
			
		||||
# define SPA_PRINTF_FUNC(fmt, arg1) __attribute__((format(printf, fmt, arg1)))
 | 
			
		||||
#else
 | 
			
		||||
# define SPA_PRINTF_FUNC(fmt, arg1)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#ifdef __cplusplus
 | 
			
		||||
}  /* extern "C" */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -87,7 +87,7 @@ struct _SpaLog {
 | 
			
		|||
                           const char    *file,
 | 
			
		||||
                           int            line,
 | 
			
		||||
                           const char    *func,
 | 
			
		||||
                           const char    *fmt, ...);
 | 
			
		||||
                           const char    *fmt, ...) SPA_PRINTF_FUNC(6, 7);
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * SpaLog::logv
 | 
			
		||||
| 
						 | 
				
			
			@ -107,7 +107,7 @@ struct _SpaLog {
 | 
			
		|||
                           int            line,
 | 
			
		||||
                           const char    *func,
 | 
			
		||||
                           const char    *fmt,
 | 
			
		||||
                           va_list        args);
 | 
			
		||||
                           va_list        args) SPA_PRINTF_FUNC(6, 0);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#if __STDC_VERSION__ >= 199901L
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue