Fix some -Wenum-conversion errors

Make pw_direction and spa_direction the same
Explicitly cast some enums or use the right enums
This commit is contained in:
Wim Taymans 2020-04-04 19:59:27 +02:00
parent 6937ec5e63
commit a5b0553328
6 changed files with 8 additions and 9 deletions

View file

@ -2259,7 +2259,7 @@ impl_init(const struct spa_handle_factory *factory,
return -EINVAL;
}
this->dbus_connection = spa_dbus_get_connection(this->dbus, DBUS_BUS_SYSTEM);
this->dbus_connection = spa_dbus_get_connection(this->dbus, SPA_DBUS_TYPE_SYSTEM);
if (this->dbus_connection == NULL) {
spa_log_error(this->log, "no dbus connection");
return -EIO;

View file

@ -294,7 +294,7 @@ impl_get_connection(void *object,
conn = calloc(1, sizeof(struct connection));
conn->this = impl_connection;
conn->impl = impl;
conn->conn = dbus_bus_get_private(type, &error);
conn->conn = dbus_bus_get_private((DBusBusType)type, &error);
if (conn->conn == NULL)
goto error;