summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2015-05-26 23:35:10 +0200
committerPeter Meerwald <pmeerw@pmeerw.net>2015-05-27 19:16:38 +0200
commit1db12f50106735f021202b51bc62e1bfc16260f1 (patch)
treeb32d6f727597dcee32488b29d07c2a0f59577299
parent6942e13a364bbaa1f9f4659936b4e40bad24ac4f (diff)
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 <pmeerw@pmeerw.net>
-rw-r--r--src/pulsecore/sink.c2
-rw-r--r--src/pulsecore/source.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
index f29a9b7c8..a22c19939 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 97f6cd9b0..4be730607 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);