tools: fix scan-build errors for unused variables

All cases of value stored but never read
This commit is contained in:
Peter Hutterer 2021-05-10 11:58:29 +10:00 committed by Wim Taymans
parent 0b5f19f1d2
commit e1211e6a94
2 changed files with 1 additions and 3 deletions

View file

@ -2093,7 +2093,6 @@ dump_properties(struct data *data, struct global *global,
ind, item->key, item->value); ind, item->key, item->value);
extra = NULL; extra = NULL;
id = -1;
if (spa_streq(global->type, PW_TYPE_INTERFACE_Port) && spa_streq(item->key, PW_KEY_NODE_ID)) { if (spa_streq(global->type, PW_TYPE_INTERFACE_Port) && spa_streq(item->key, PW_KEY_NODE_ID)) {
id = atoi(item->value); id = atoi(item->value);
if (id >= 0) if (id >= 0)

View file

@ -362,7 +362,6 @@ static void registry_event_global(void *data, uint32_t id,
struct pw_proxy *proxy; struct pw_proxy *proxy;
if (spa_streq(type, PW_TYPE_INTERFACE_Node)) { if (spa_streq(type, PW_TYPE_INTERFACE_Node)) {
struct node *n;
const char *str; const char *str;
if ((str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL && if ((str = spa_dict_lookup(props, PW_KEY_NODE_NAME)) == NULL &&
@ -370,7 +369,7 @@ static void registry_event_global(void *data, uint32_t id,
str = spa_dict_lookup(props, PW_KEY_APP_NAME); str = spa_dict_lookup(props, PW_KEY_APP_NAME);
} }
if ((n = add_node(d, id, str)) == NULL) { if (add_node(d, id, str) == NULL) {
pw_log_warn("can add node %u: %m", id); pw_log_warn("can add node %u: %m", id);
} }
} else if (spa_streq(type, PW_TYPE_INTERFACE_Profiler)) { } else if (spa_streq(type, PW_TYPE_INTERFACE_Profiler)) {