src/pulsecore/sink.c | 2 +- src/pulsecore/source.c | 2 +- src/utils/padsp.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1db12f50106735f021202b51bc62e1bfc16260f1 Author: Peter Meerwald <[email protected]> Date: Tue May 26 23:35:10 2015 +0200 core: Work around -Wlogical-not-parentheses warnings pulsecore/sink.c: In function 'pa_sink_put': pulsecore/sink.c:648:53: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0)); ^ pulsecore/source.c: In function 'pa_source_put': pulsecore/source.c:599:55: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] pa_assert(!(s->flags & PA_SOURCE_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0)); ^ rewrite expression to suppress warning: !(x & MASK) == (y != 0) <-> !(x & MASK) == !(y == 0) Signed-off-by: Peter Meerwald <[email protected]> diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index f29a9b7..a22c199 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -645,7 +645,7 @@ void pa_sink_put(pa_sink* s) { || (s->base_volume == PA_VOLUME_NORM && ((s->flags & PA_SINK_DECIBEL_VOLUME || (s->flags & PA_SINK_SHARE_VOLUME_WITH_MASTER))))); pa_assert(!(s->flags & PA_SINK_DECIBEL_VOLUME) || s->n_volume_steps == PA_VOLUME_NORM+1); - pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0)); + pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == !(s->thread_info.fixed_latency == 0)); pa_assert(!(s->flags & PA_SINK_LATENCY) == !(s->monitor_source->flags & PA_SOURCE_LATENCY)); pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == !(s->monitor_source->flags & PA_SOURCE_DYNAMIC_LATENCY)); diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 97f6cd9..4be7306 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -596,7 +596,7 @@ void pa_source_put(pa_source *s) { || (s->base_volume == PA_VOLUME_NORM && ((s->flags & PA_SOURCE_DECIBEL_VOLUME || (s->flags & PA_SOURCE_SHARE_VOLUME_WITH_MASTER))))); pa_assert(!(s->flags & PA_SOURCE_DECIBEL_VOLUME) || s->n_volume_steps == PA_VOLUME_NORM+1); - pa_assert(!(s->flags & PA_SOURCE_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0)); + pa_assert(!(s->flags & PA_SOURCE_DYNAMIC_LATENCY) == !(s->thread_info.fixed_latency == 0)); if (s->suspend_cause) pa_assert_se(source_set_state(s, PA_SOURCE_SUSPENDED) == 0); commit 6942e13a364bbaa1f9f4659936b4e40bad24ac4f Author: Peter Meerwald <[email protected]> Date: Tue May 26 23:09:50 2015 +0200 padsp: Fix wrong condition discovered by -Wlogical-not-parentheses warning warnings emited by gcc 5.1: utils/padsp.c: In function 'dsp_trigger': utils/padsp.c:1902:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] while (!pa_operation_get_state(o) != PA_OPERATION_DONE) { ^ utils/padsp.c: In function 'dsp_cork': utils/padsp.c:1937:39: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] while (!pa_operation_get_state(o) != PA_OPERATION_DONE) { ^ Signed-off-by: Peter Meerwald <[email protected]> diff --git a/src/utils/padsp.c b/src/utils/padsp.c index e61373c..b696b39 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -1899,7 +1899,7 @@ static int dsp_trigger(fd_info *i) { } i->operation_success = 0; - while (!pa_operation_get_state(o) != PA_OPERATION_DONE) { + while (pa_operation_get_state(o) != PA_OPERATION_DONE) { PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, fail); pa_threaded_mainloop_wait(i->mainloop); @@ -1934,7 +1934,7 @@ static int dsp_cork(fd_info *i, pa_stream *s, int b) { } i->operation_success = 0; - while (!pa_operation_get_state(o) != PA_OPERATION_DONE) { + while (pa_operation_get_state(o) != PA_OPERATION_DONE) { if (s == i->play_stream) PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, fail); else if (s == i->rec_stream) _______________________________________________ pulseaudio-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits
