diff options
| author | Yabin Cui <yabinc@google.com> | 2016-03-21 17:46:21 -0700 |
|---|---|---|
| committer | Yabin Cui <yabinc@google.com> | 2016-03-30 11:13:40 -0700 |
| commit | dd4c75e6e31dabfcdd7fce0c2cdf1f5b0f5fd357 (patch) | |
| tree | f59388256f435107527b832b561970eec2c3890c /libunwindstack/tests/MemoryLocalTest.cpp | |
| parent | 5e635f7c06a01ec635a9774d4cf942e058dddb11 (diff) | |
base: Avoid compilation error when compiled with -Wdangling-else.
As logging macros uses `if xxx else yyy` style, it is reported as an
error when DCHECK() is compiled with -Wdangling-else option. Because
after preprocess, DCHECK(x) becomes:
if (EnableDChecks)
if (x)
;
else
LogMessage(FATAL) << yyy;
This CL avoids compilation error by replacing `if xxx else yyy`
with `xxx && yyy` or `!(xxx) || yyy`.
Bug: 26962895
Change-Id: Ib0bf242cc04a238ec31a1ab66b53fc8a5b5ed28f
(cherry picked from commit 2527628edae5651cb28e72b2c98f24e72dcdb384)
Diffstat (limited to 'libunwindstack/tests/MemoryLocalTest.cpp')
0 files changed, 0 insertions, 0 deletions
