core: Work around -Wlogical-not-parentheses warnings 05/141305/1
authorPeter Meerwald <pmeerw@pmeerw.net>
Tue, 26 May 2015 21:35:10 +0000 (23:35 +0200)
committerSeungbae Shin <seungbae.shin@samsung.com>
Mon, 31 Jul 2017 02:42:49 +0000 (11:42 +0900)
commit5981ca1b57ab7c7666a1c89a4d15153122e80b88
treed988a3b8312cd4f359de4577790bb38914c0edee
parentcb50230069bbe831e47cd426273bccff3f7b5abb
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)

Change-Id: Iba926986cc16d17f0d74e7ca58d987592dfa7ed7
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Seungbae Shin <seungbae.shin@samsung.com>
src/pulsecore/sink.c
src/pulsecore/source.c