diff options
author | Björn Gustavsson <[email protected]> | 2017-08-14 15:39:41 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-08-23 05:57:38 +0200 |
commit | a9ea42890b6ce8fa35aeba5c6de3a45f97802b23 (patch) | |
tree | f090188c03e5d2f0fe7143415b9781a8b8603cac /erts/emulator/beam/arith_instrs.tab | |
parent | 83d5a3cfb5e55e6877ddecf3d33dccf0d3197520 (diff) | |
download | otp-a9ea42890b6ce8fa35aeba5c6de3a45f97802b23.tar.gz otp-a9ea42890b6ce8fa35aeba5c6de3a45f97802b23.tar.bz2 otp-a9ea42890b6ce8fa35aeba5c6de3a45f97802b23.zip |
arith_instrs.tab: Eliminate warning for uninitialized value
Make it clear to GCC that shift_left_count is initialized.
Diffstat (limited to 'erts/emulator/beam/arith_instrs.tab')
-rw-r--r-- | erts/emulator/beam/arith_instrs.tab | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/erts/emulator/beam/arith_instrs.tab b/erts/emulator/beam/arith_instrs.tab index 91fe21e161..b8fbd80dad 100644 --- a/erts/emulator/beam/arith_instrs.tab +++ b/erts/emulator/beam/arith_instrs.tab @@ -236,6 +236,7 @@ shift.setup_bsr(Src1, Src2) { Op1 = $Src1; Op2 = $Src2; BIF = BIF_bsr_2; + shift_left_count = 0; if (is_small(Op2)) { shift_left_count = -signed_val(Op2); } else if (is_big(Op2)) { @@ -245,8 +246,6 @@ shift.setup_bsr(Src1, Src2) { */ shift_left_count = make_small(bignum_header_is_neg(*big_val(Op2)) ? MAX_SMALL : MIN_SMALL); - } else { - shift_left_count = 0; } } @@ -254,6 +253,7 @@ shift.setup_bsl(Src1, Src2) { Op1 = $Src1; Op2 = $Src2; BIF = BIF_bsl_2; + shift_left_count = 0; if (is_small(Op2)) { shift_left_count = signed_val(Op2); } else if (is_big(Op2)) { @@ -271,8 +271,6 @@ shift.setup_bsl(Src1, Src2) { */ shift_left_count = MAX_SMALL; } - } else { - shift_left_count = 0; } } |