mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-10-29 05:40:27 -04:00 
			
		
		
		
	Fix clang warnings about comparing uint32 < 0 (#10)
* Fix clang warnings about comparing uint32 < 0 clangs complains about an uint32 compared to < 0: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] So remove these comparisos and an uint32 never will be less than 0. Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com> * module-jack.c: Differentiate error msg from protocol-native Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
This commit is contained in:
		
							parent
							
								
									6afcb4981f
								
							
						
					
					
						commit
						b0c3936477
					
				
					 6 changed files with 6 additions and 6 deletions
				
			
		|  | @ -548,7 +548,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory, | |||
| 	spa_return_val_if_fail(factory != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 	spa_return_val_if_fail(info != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 
 | ||||
| 	if (index < 0 || index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 	if (index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 		return SPA_RESULT_ENUM_END; | ||||
| 
 | ||||
| 	*info = &impl_interfaces[index]; | ||||
|  |  | |||
|  | @ -741,7 +741,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory, | |||
| 	spa_return_val_if_fail(factory != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 	spa_return_val_if_fail(info != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 
 | ||||
| 	if (index < 0 || index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 	if (index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 		return SPA_RESULT_ENUM_END; | ||||
| 
 | ||||
| 	*info = &impl_interfaces[index]; | ||||
|  |  | |||
|  | @ -415,7 +415,7 @@ impl_enum_interface_info(const struct spa_handle_factory *factory, | |||
| 	spa_return_val_if_fail(factory != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 	spa_return_val_if_fail(info != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 
 | ||||
| 	if (index < 0 || index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 	if (index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 		return SPA_RESULT_ENUM_END; | ||||
| 
 | ||||
| 	*info = &impl_interfaces[index]; | ||||
|  |  | |||
|  | @ -985,7 +985,7 @@ static int impl_enum_interface_info(const struct spa_handle_factory *factory, | |||
| 	spa_return_val_if_fail(factory != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 	spa_return_val_if_fail(info != NULL, SPA_RESULT_INVALID_ARGUMENTS); | ||||
| 
 | ||||
| 	if (index < 0 || index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 	if (index >= SPA_N_ELEMENTS(impl_interfaces)) | ||||
| 		return SPA_RESULT_ENUM_END; | ||||
| 
 | ||||
| 	*info = &impl_interfaces[index]; | ||||
|  |  | |||
|  | @ -989,7 +989,7 @@ connection_data(void *data, int fd, enum spa_io mask) | |||
| 	struct client *client = data; | ||||
| 
 | ||||
| 	if (mask & (SPA_IO_ERR | SPA_IO_HUP)) { | ||||
| 		pw_log_error("protocol-native %p: got connection error", client->impl); | ||||
| 		pw_log_error("jack %p: got connection error", client->impl); | ||||
| 		client_killed(client); | ||||
| 		return; | ||||
| 	} | ||||
|  |  | |||
|  | @ -75,7 +75,7 @@ int pw_protocol_native_connection_get_fd(struct pw_protocol_native_connection *c | |||
| { | ||||
| 	struct impl *impl = SPA_CONTAINER_OF(conn, struct impl, this); | ||||
| 
 | ||||
| 	if (index < 0 || index >= impl->in.n_fds) | ||||
| 	if (index >= impl->in.n_fds) | ||||
| 		return -1; | ||||
| 
 | ||||
| 	return impl->in.fds[index]; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Marcos Paulo de Souza
						Marcos Paulo de Souza