mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-01 22:58:47 -04:00
device-manager: Fix compiler warning.
Do not use a variable called 'index' as it clashes with string.h
This commit is contained in:
parent
c9375aa5e9
commit
bec67cd75f
1 changed files with 4 additions and 4 deletions
|
|
@ -1033,13 +1033,13 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
|
|||
if ((e = read_entry(u, name))) {
|
||||
uint32_t idx;
|
||||
char *devname;
|
||||
uint32_t index = PA_INVALID_INDEX;
|
||||
uint32_t found_index = PA_INVALID_INDEX;
|
||||
|
||||
if ((devname = get_name(name, "sink:"))) {
|
||||
pa_sink* s;
|
||||
PA_IDXSET_FOREACH(s, u->core->sinks, idx) {
|
||||
if (strcmp(s->name, devname) == 0) {
|
||||
index = s->index;
|
||||
found_index = s->index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1048,7 +1048,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
|
|||
pa_source* s;
|
||||
PA_IDXSET_FOREACH(s, u->core->sources, idx) {
|
||||
if (strcmp(s->name, devname) == 0) {
|
||||
index = s->index;
|
||||
found_index = s->index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1058,7 +1058,7 @@ static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connectio
|
|||
pa_tagstruct_puts(reply, name);
|
||||
pa_tagstruct_puts(reply, e->description);
|
||||
pa_tagstruct_puts(reply, e->icon);
|
||||
pa_tagstruct_putu32(reply, index);
|
||||
pa_tagstruct_putu32(reply, found_index);
|
||||
pa_tagstruct_putu32(reply, NUM_ROLES);
|
||||
|
||||
for (uint32_t i = ROLE_NONE; i < NUM_ROLES; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue