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:
Marcos Paulo de Souza 2017-09-04 06:09:08 -03:00 committed by Wim Taymans
parent 6afcb4981f
commit b0c3936477
6 changed files with 6 additions and 6 deletions

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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];

View file

@ -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;
}

View file

@ -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];