summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Meerwald-Stadler <pmeerw@pmeerw.net>2017-09-06 11:20:54 +0200
committerPeter Meerwald-Stadler <pmeerw@pmeerw.net>2017-10-09 10:39:57 +0200
commit6f065f95898ef813d16c4b17c678da5fb6074ea6 (patch)
treee477e741744b9a334f04d4b7c003441289b60bbd
parent0f94657cd0ed9a13c0fda061323fb430742a3ae4 (diff)
downloadpulseaudio-6f065f95898ef813d16c4b17c678da5fb6074ea6.tar.gz
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>
-rw-r--r--src/pulsecore/sink-input.c11
-rw-r--r--src/pulsecore/source-output.c11
2 files changed, 6 insertions, 16 deletions
diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
index 4155b69a5..d1e16ee27 100644
--- a/src/pulsecore/sink-input.c
+++ b/src/pulsecore/sink-input.c
@@ -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;
- }
}
}
diff --git a/src/pulsecore/source-output.c b/src/pulsecore/source-output.c
index a4c99af0e..d2b645c2d 100644
--- a/src/pulsecore/source-output.c
+++ b/src/pulsecore/source-output.c
@@ -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;
- }
}
}