mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	macro: Add macro PA_UNUSED
the macro PA_UNUSED may be used to suppress a warning when a variable is not used, or assigned and never used; this typically happens when the only use of the variable is within an assert() that can be optimized away (i.e. with NDEBUG set) has an effect with GCC only v2: (thanks to Alexander Patrakov) * fix patch subject/description Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
		
							parent
							
								
									094de7f024
								
							
						
					
					
						commit
						87d188b46c
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -77,6 +77,12 @@ static inline size_t PA_PAGE_ALIGN(size_t l) {
 | 
			
		|||
    return (l + PA_PAGE_SIZE - 1) & ~(PA_PAGE_SIZE - 1);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__)
 | 
			
		||||
    #define PA_UNUSED __attribute__ ((unused))
 | 
			
		||||
#else
 | 
			
		||||
    #define PA_UNUSED
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#define PA_ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0]))
 | 
			
		||||
 | 
			
		||||
#if defined(__GNUC__)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue