mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: fix scan-build errors for unused variables
All cases of value stored but never read
This commit is contained in:
parent
6d19dd0162
commit
4dd886188a
4 changed files with 8 additions and 8 deletions
|
|
@ -5159,7 +5159,7 @@ void pa_alsa_profile_set_probe(
|
|||
pp += add_profiles_to_probe(pp, ps->profiles, false, false);
|
||||
pp += add_profiles_to_probe(pp, ps->profiles, false, true);
|
||||
pp += add_profiles_to_probe(pp, ps->profiles, true, false);
|
||||
pp += add_profiles_to_probe(pp, ps->profiles, true, true);
|
||||
add_profiles_to_probe(pp, ps->profiles, true, true);
|
||||
|
||||
for (pp = probe_order; *pp; pp++) {
|
||||
uint32_t idx;
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ static int apply_device_props(struct impl *this, struct acp_device *dev, struct
|
|||
int changed = 0;
|
||||
float volumes[ACP_MAX_CHANNELS];
|
||||
uint32_t channels[ACP_MAX_CHANNELS];
|
||||
uint32_t n_volumes = 0, n_channels = 0;
|
||||
uint32_t n_volumes = 0;
|
||||
|
||||
if (!spa_pod_is_object_type(props, SPA_TYPE_OBJECT_Props))
|
||||
return -EINVAL;
|
||||
|
|
@ -594,8 +594,8 @@ static int apply_device_props(struct impl *this, struct acp_device *dev, struct
|
|||
}
|
||||
break;
|
||||
case SPA_PROP_channelMap:
|
||||
if ((n_channels = spa_pod_copy_array(&prop->value, SPA_TYPE_Id,
|
||||
channels, ACP_MAX_CHANNELS)) > 0) {
|
||||
if (spa_pod_copy_array(&prop->value, SPA_TYPE_Id,
|
||||
channels, ACP_MAX_CHANNELS) > 0) {
|
||||
changed++;
|
||||
}
|
||||
break;
|
||||
|
|
@ -634,7 +634,7 @@ static int impl_set_param(void *object,
|
|||
return res;
|
||||
}
|
||||
|
||||
res = acp_card_set_profile(this->card, id, save ? ACP_PROFILE_SAVE : 0);
|
||||
acp_card_set_profile(this->card, id, save ? ACP_PROFILE_SAVE : 0);
|
||||
emit_info(this, false);
|
||||
break;
|
||||
}
|
||||
|
|
@ -662,7 +662,7 @@ static int impl_set_param(void *object,
|
|||
return -EINVAL;
|
||||
|
||||
dev = this->card->devices[device];
|
||||
res = acp_device_set_port(dev, id, save ? ACP_PORT_SAVE : 0);
|
||||
acp_device_set_port(dev, id, save ? ACP_PORT_SAVE : 0);
|
||||
if (props)
|
||||
apply_device_props(this, dev, props);
|
||||
emit_info(this, false);
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ skip_channels:
|
|||
|
||||
fmt = spa_pod_builder_pop(&b, &f[0]);
|
||||
|
||||
if ((res = spa_pod_filter(&b, &result.param, fmt, filter)) < 0)
|
||||
if (spa_pod_filter(&b, &result.param, fmt, filter) < 0)
|
||||
goto next;
|
||||
|
||||
spa_node_emit_result(&state->hooks, seq, 0, SPA_RESULT_TYPE_NODE_PARAMS, &result);
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ static uint32_t get_card_id(struct impl *this, struct udev_device *dev)
|
|||
if ((str = udev_device_get_property_value(dev, "SOUND_CLASS")) && spa_streq(str, "modem"))
|
||||
return SPA_ID_INVALID;
|
||||
|
||||
if ((str = udev_device_get_property_value(dev, "SOUND_INITIALIZED")) == NULL)
|
||||
if (udev_device_get_property_value(dev, "SOUND_INITIALIZED") == NULL)
|
||||
return SPA_ID_INVALID;
|
||||
|
||||
if ((str = udev_device_get_property_value(dev, "DEVPATH")) == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue