core: Fix gcc-7 -Wimplicit-fallthrough= warnings

the comment /* Fall through. */ fixes the warning, but gcc-7 seems to be more
picky about the position in the code

pulsecore/sink-input.c: In function ‘pa_sink_input_update_proplist’:
pulsecore/sink-input.c:1531:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
             for (state = NULL; (key = pa_proplist_iterate(i->proplist, &state));) {
             ^~~
pulsecore/sink-input.c:1539:9: note: here
         case PA_UPDATE_REPLACE: {
         ^~~~

Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
This commit is contained in:
Peter Meerwald-Stadler 2017-09-06 11:20:54 +02:00
parent 0f94657cd0
commit 6f065f9589
2 changed files with 6 additions and 16 deletions

View file

@ -1526,7 +1526,7 @@ void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_p
pa_assert_ctl_context();
switch (mode) {
case PA_UPDATE_SET: {
case PA_UPDATE_SET:
/* Delete everything that is not in p. */
for (state = NULL; (key = pa_proplist_iterate(i->proplist, &state));) {
if (!pa_proplist_contains(p, key))
@ -1534,18 +1534,14 @@ void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_p
}
/* Fall through. */
}
case PA_UPDATE_REPLACE: {
case PA_UPDATE_REPLACE:
for (state = NULL; (key = pa_proplist_iterate(p, &state));) {
pa_proplist_get(p, key, (const void **) &value, &nbytes);
pa_sink_input_set_property_arbitrary(i, key, value, nbytes);
}
break;
}
case PA_UPDATE_MERGE: {
case PA_UPDATE_MERGE:
for (state = NULL; (key = pa_proplist_iterate(p, &state));) {
if (pa_proplist_contains(i->proplist, key))
continue;
@ -1555,7 +1551,6 @@ void pa_sink_input_update_proplist(pa_sink_input *i, pa_update_mode_t mode, pa_p
}
break;
}
}
}

View file

@ -1171,7 +1171,7 @@ void pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode
pa_assert_ctl_context();
switch (mode) {
case PA_UPDATE_SET: {
case PA_UPDATE_SET:
/* Delete everything that is not in p. */
for (state = NULL; (key = pa_proplist_iterate(o->proplist, &state));) {
if (!pa_proplist_contains(p, key))
@ -1179,18 +1179,14 @@ void pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode
}
/* Fall through. */
}
case PA_UPDATE_REPLACE: {
case PA_UPDATE_REPLACE:
for (state = NULL; (key = pa_proplist_iterate(p, &state));) {
pa_proplist_get(p, key, (const void **) &value, &nbytes);
pa_source_output_set_property_arbitrary(o, key, value, nbytes);
}
break;
}
case PA_UPDATE_MERGE: {
case PA_UPDATE_MERGE:
for (state = NULL; (key = pa_proplist_iterate(p, &state));) {
if (pa_proplist_contains(o->proplist, key))
continue;
@ -1200,7 +1196,6 @@ void pa_source_output_update_proplist(pa_source_output *o, pa_update_mode_t mode
}
break;
}
}
}