mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-08 08:21:04 -04:00
fix some uninitialized variables warnings
This commit is contained in:
parent
abd8c8f666
commit
0e0c325194
6 changed files with 8 additions and 9 deletions
|
|
@ -1651,7 +1651,7 @@ static const struct pw_stream_events out_stream_events = {
|
||||||
|
|
||||||
static int setup_streams(struct impl *impl)
|
static int setup_streams(struct impl *impl)
|
||||||
{
|
{
|
||||||
int res;
|
int res = 0;
|
||||||
uint32_t i, n_params, *offs, flags;
|
uint32_t i, n_params, *offs, flags;
|
||||||
struct pw_array offsets;
|
struct pw_array offsets;
|
||||||
const struct spa_pod **params = NULL;
|
const struct spa_pod **params = NULL;
|
||||||
|
|
|
||||||
|
|
@ -4750,7 +4750,6 @@ static int do_set_profile(struct client *client, uint32_t command, uint32_t tag,
|
||||||
static int do_set_default(struct client *client, uint32_t command, uint32_t tag, struct message *m)
|
static int do_set_default(struct client *client, uint32_t command, uint32_t tag, struct message *m)
|
||||||
{
|
{
|
||||||
struct pw_manager *manager = client->manager;
|
struct pw_manager *manager = client->manager;
|
||||||
struct pw_manager_object *o;
|
|
||||||
const char *name, *str;
|
const char *name, *str;
|
||||||
int res;
|
int res;
|
||||||
bool sink = command == COMMAND_SET_DEFAULT_SINK;
|
bool sink = command == COMMAND_SET_DEFAULT_SINK;
|
||||||
|
|
@ -4767,10 +4766,10 @@ static int do_set_default(struct client *client, uint32_t command, uint32_t tag,
|
||||||
if (spa_streq(name, "@NONE@"))
|
if (spa_streq(name, "@NONE@"))
|
||||||
name = NULL;
|
name = NULL;
|
||||||
|
|
||||||
if (name != NULL && (o = find_device(client, SPA_ID_INVALID, name, sink, NULL)) == NULL)
|
|
||||||
return -ENOENT;
|
|
||||||
|
|
||||||
if (name != NULL) {
|
if (name != NULL) {
|
||||||
|
struct pw_manager_object *o;
|
||||||
|
if ((o = find_device(client, SPA_ID_INVALID, name, sink, NULL)) == NULL)
|
||||||
|
return -ENOENT;
|
||||||
if (o->props && (str = pw_properties_get(o->props, PW_KEY_NODE_NAME)) != NULL)
|
if (o->props && (str = pw_properties_get(o->props, PW_KEY_NODE_NAME)) != NULL)
|
||||||
name = str;
|
name = str;
|
||||||
else if (spa_strendswith(name, ".monitor"))
|
else if (spa_strendswith(name, ".monitor"))
|
||||||
|
|
|
||||||
|
|
@ -481,7 +481,7 @@ int pw_rtsp_client_connect(struct pw_rtsp_client *client,
|
||||||
{
|
{
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
struct addrinfo *result, *rp;
|
struct addrinfo *result, *rp;
|
||||||
int res, fd;
|
int res, fd = -1;
|
||||||
char port_str[12];
|
char port_str[12];
|
||||||
|
|
||||||
if (client->source != NULL)
|
if (client->source != NULL)
|
||||||
|
|
|
||||||
|
|
@ -963,7 +963,7 @@ int pw_websocket_connect(struct pw_websocket *ws, void *user,
|
||||||
{
|
{
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
struct addrinfo *result, *rp;
|
struct addrinfo *result, *rp;
|
||||||
int res, fd;
|
int res, fd = -1;
|
||||||
struct pw_websocket_connection *conn = NULL;
|
struct pw_websocket_connection *conn = NULL;
|
||||||
|
|
||||||
memset(&hints, 0, sizeof(hints));
|
memset(&hints, 0, sizeof(hints));
|
||||||
|
|
|
||||||
|
|
@ -416,7 +416,7 @@ static int snapcast_connect(struct tunnel *t)
|
||||||
{
|
{
|
||||||
struct addrinfo hints;
|
struct addrinfo hints;
|
||||||
struct addrinfo *result, *rp;
|
struct addrinfo *result, *rp;
|
||||||
int res, fd;
|
int res, fd = -1;
|
||||||
char port_str[12];
|
char port_str[12];
|
||||||
|
|
||||||
if (t->server_address == NULL)
|
if (t->server_address == NULL)
|
||||||
|
|
|
||||||
|
|
@ -141,7 +141,7 @@ pw_context_load_module(struct pw_context *context,
|
||||||
{
|
{
|
||||||
struct pw_impl_module *this;
|
struct pw_impl_module *this;
|
||||||
struct impl *impl;
|
struct impl *impl;
|
||||||
void *hnd;
|
void *hnd = NULL;
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
const char *module_dir;
|
const char *module_dir;
|
||||||
int res;
|
int res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue