mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
alsa: Fix compile warnings
modules/alsa/alsa-sink.c: In function ‘pa_alsa_sink_new’:
modules/alsa/alsa-sink.c:2603:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
void *state;
^~~~~
modules/alsa/alsa-sink.c:2270:11: note: shadowed declaration is here
void *state = NULL;
^~~~~
CC modules/alsa/module_alsa_sink_la-module-alsa-sink.lo
modules/alsa/alsa-source.c: In function ‘pa_alsa_source_new’:
modules/alsa/alsa-source.c:2289:15: warning: declaration of ‘state’ shadows a previous local [-Wshadow]
void *state;
^~~~~
modules/alsa/alsa-source.c:1975:11: note: shadowed declaration is here
void *state = NULL;
^~~~~
modules/alsa/module-alsa-card.c: In function ‘prune_singleton_availability_groups’:
modules/alsa/module-alsa-card.c:691:71: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
pa_hashmap_put(group_counts, p->availability_group, count + 1);
^
This commit is contained in:
parent
eaa6d5d6c1
commit
e99e862a3d
3 changed files with 5 additions and 5 deletions
|
|
@ -2267,7 +2267,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
|
||||||
bool volume_is_set;
|
bool volume_is_set;
|
||||||
bool mute_is_set;
|
bool mute_is_set;
|
||||||
pa_alsa_profile_set *profile_set = NULL;
|
pa_alsa_profile_set *profile_set = NULL;
|
||||||
void *state = NULL;
|
void *state;
|
||||||
|
|
||||||
pa_assert(m);
|
pa_assert(m);
|
||||||
pa_assert(ma);
|
pa_assert(ma);
|
||||||
|
|
@ -2563,6 +2563,7 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
|
||||||
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_NAME, mapping->name);
|
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_NAME, mapping->name);
|
||||||
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, mapping->description);
|
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, mapping->description);
|
||||||
|
|
||||||
|
state = NULL;
|
||||||
while ((key = pa_proplist_iterate(mapping->proplist, &state)))
|
while ((key = pa_proplist_iterate(mapping->proplist, &state)))
|
||||||
pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
|
pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
|
||||||
}
|
}
|
||||||
|
|
@ -2600,7 +2601,6 @@ pa_sink *pa_alsa_sink_new(pa_module *m, pa_modargs *ma, const char*driver, pa_ca
|
||||||
|
|
||||||
if (u->ucm_context) {
|
if (u->ucm_context) {
|
||||||
pa_device_port *port;
|
pa_device_port *port;
|
||||||
void *state;
|
|
||||||
unsigned h_prio = 0;
|
unsigned h_prio = 0;
|
||||||
PA_HASHMAP_FOREACH(port, u->sink->ports, state) {
|
PA_HASHMAP_FOREACH(port, u->sink->ports, state) {
|
||||||
if (!h_prio || port->priority > h_prio)
|
if (!h_prio || port->priority > h_prio)
|
||||||
|
|
|
||||||
|
|
@ -1972,7 +1972,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
|
||||||
bool volume_is_set;
|
bool volume_is_set;
|
||||||
bool mute_is_set;
|
bool mute_is_set;
|
||||||
pa_alsa_profile_set *profile_set = NULL;
|
pa_alsa_profile_set *profile_set = NULL;
|
||||||
void *state = NULL;
|
void *state;
|
||||||
|
|
||||||
pa_assert(m);
|
pa_assert(m);
|
||||||
pa_assert(ma);
|
pa_assert(ma);
|
||||||
|
|
@ -2250,6 +2250,7 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
|
||||||
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_NAME, mapping->name);
|
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_NAME, mapping->name);
|
||||||
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, mapping->description);
|
pa_proplist_sets(data.proplist, PA_PROP_DEVICE_PROFILE_DESCRIPTION, mapping->description);
|
||||||
|
|
||||||
|
state = NULL;
|
||||||
while ((key = pa_proplist_iterate(mapping->proplist, &state)))
|
while ((key = pa_proplist_iterate(mapping->proplist, &state)))
|
||||||
pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
|
pa_proplist_sets(data.proplist, key, pa_proplist_gets(mapping->proplist, key));
|
||||||
}
|
}
|
||||||
|
|
@ -2286,7 +2287,6 @@ pa_source *pa_alsa_source_new(pa_module *m, pa_modargs *ma, const char*driver, p
|
||||||
|
|
||||||
if (u->ucm_context) {
|
if (u->ucm_context) {
|
||||||
pa_device_port *port;
|
pa_device_port *port;
|
||||||
void *state;
|
|
||||||
unsigned h_prio = 0;
|
unsigned h_prio = 0;
|
||||||
PA_HASHMAP_FOREACH(port, u->source->ports, state) {
|
PA_HASHMAP_FOREACH(port, u->source->ports, state) {
|
||||||
if (!h_prio || port->priority > h_prio)
|
if (!h_prio || port->priority > h_prio)
|
||||||
|
|
|
||||||
|
|
@ -688,7 +688,7 @@ static void prune_singleton_availability_groups(pa_hashmap *ports) {
|
||||||
if (p->availability_group) {
|
if (p->availability_group) {
|
||||||
count = pa_hashmap_get(group_counts, p->availability_group);
|
count = pa_hashmap_get(group_counts, p->availability_group);
|
||||||
pa_hashmap_remove(group_counts, p->availability_group);
|
pa_hashmap_remove(group_counts, p->availability_group);
|
||||||
pa_hashmap_put(group_counts, p->availability_group, count + 1);
|
pa_hashmap_put(group_counts, p->availability_group, PA_UINT_TO_PTR(PA_PTR_TO_UINT(count) + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue