mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	pulse: avoid errors with const
This commit is contained in:
		
							parent
							
								
									4314fba7c4
								
							
						
					
					
						commit
						b0932e687f
					
				
					 2 changed files with 4 additions and 3 deletions
				
			
		| 
						 | 
					@ -29,12 +29,13 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "internal.h"
 | 
					#include "internal.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_context_set_error(pa_context *c, int error) {
 | 
					int pa_context_set_error(PA_CONST pa_context *c, int error) {
 | 
				
			||||||
	pa_assert(error >= 0);
 | 
						pa_assert(error >= 0);
 | 
				
			||||||
	pa_assert(error < PA_ERR_MAX);
 | 
						pa_assert(error < PA_ERR_MAX);
 | 
				
			||||||
	if (c && c->error != error) {
 | 
						if (c && c->error != error) {
 | 
				
			||||||
		pw_log_debug("context %p: error %d %s", c, error, pa_strerror(error));
 | 
							pw_log_debug("context %p: error %d %s", c, error, pa_strerror(error));
 | 
				
			||||||
		c->error = error;
 | 
							((pa_context*)c)->error = error;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return error;
 | 
						return error;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -127,7 +127,7 @@ static inline const char *pa_strnull(const char *x) {
 | 
				
			||||||
    return x ? x : "(null)";
 | 
					    return x ? x : "(null)";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int pa_context_set_error(pa_context *c, int error);
 | 
					int pa_context_set_error(PA_CONST pa_context *c, int error);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define PA_CHECK_VALIDITY(context, expression, error)			\
 | 
					#define PA_CHECK_VALIDITY(context, expression, error)			\
 | 
				
			||||||
do {									\
 | 
					do {									\
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue