diff options
author | Anthony Ramine <[email protected]> | 2013-10-14 23:39:26 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2013-12-02 15:20:49 +0100 |
commit | 2b8016ebb9d487be590c01390928d1cc83c8225c (patch) | |
tree | 295232119f1dd3d2be8ef893804247742861051b /erts/emulator | |
parent | 2567dfefa9426c61cdbea3c984e6c7e7d6dad1ea (diff) | |
download | otp-2b8016ebb9d487be590c01390928d1cc83c8225c.tar.gz otp-2b8016ebb9d487be590c01390928d1cc83c8225c.tar.bz2 otp-2b8016ebb9d487be590c01390928d1cc83c8225c.zip |
Fix erts_check_off_heap2 assertion
The test needs to be false to fail, not true. This was noticed with the
following warning, where marking erl_assert_error as non-returning didn't
help:
beam/erl_gc.c:2772:2: warning: variable 'refc' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
default:
^~~~~~~
beam/erl_gc.c:2775:26: note: uninitialized use occurs here
ERTS_CHK_OFFHEAP_ASSERT(refc >= 1);
^~~~
beam/erl_gc.c:2738:11: note: expanded from macro 'ERTS_CHK_OFFHEAP_ASSERT'
if (!(EXP)) \
^
beam/erl_gc.c:2759:18: note: initialize the variable 'refc' to silence this warning
erts_aint_t refc;
^
= 0
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c index 8ba94d89e9..e89725c190 100644 --- a/erts/emulator/beam/erl_gc.c +++ b/erts/emulator/beam/erl_gc.c @@ -2770,7 +2770,7 @@ erts_check_off_heap2(Process *p, Eterm *htop) refc = erts_refc_read(&u.ext->node->refc, 1); break; default: - ASSERT(!!"erts_check_off_heap2: Invalid thing_word"); + ASSERT(!"erts_check_off_heap2: Invalid thing_word"); } ERTS_CHK_OFFHEAP_ASSERT(refc >= 1); #ifdef ERTS_OFFHEAP_DEBUG_CHK_CIRCULAR_LIST |