diff options
author | Sverker Eriksson <[email protected]> | 2014-01-15 21:16:37 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2014-01-15 22:28:49 +0100 |
commit | ee1886e457302347414787e74ce5017604d2e52a (patch) | |
tree | 36bad6fa05c8339d95961b989c1b3268c0652a29 /erts/emulator/beam | |
parent | 5737a9a1d0d2fdafe9fc34dd35e07233c70b53c4 (diff) | |
download | otp-ee1886e457302347414787e74ce5017604d2e52a.tar.gz otp-ee1886e457302347414787e74ce5017604d2e52a.tar.bz2 otp-ee1886e457302347414787e74ce5017604d2e52a.zip |
erts: Fix compiler warnings for NO_JUMP_TABLE
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/beam_emu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 78ab6fa30f..0609e86a39 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 1996-2013. All Rights Reserved. + * Copyright Ericsson AB 1996-2014. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in @@ -48,7 +48,7 @@ # define OpCase(OpCode) case op_##OpCode # define CountCase(OpCode) case op_count_##OpCode # define OpCode(OpCode) ((Uint*)op_##OpCode) -# define Goto(Rel) {Go = (int)(Rel); goto emulator_loop;} +# define Goto(Rel) {Go = (int)(UWord)(Rel); goto emulator_loop;} # define LabelAddr(Addr) &&##Addr #else # define OpCase(OpCode) lb_##OpCode @@ -133,7 +133,7 @@ do { \ /* We don't check the range if an ordinary switch is used */ #ifdef NO_JUMP_TABLE -#define VALID_INSTR(IP) (0 <= (int)(IP) && ((int)(IP) < (NUMBER_OF_OPCODES*2+10))) +#define VALID_INSTR(IP) ((UWord)(IP) < (NUMBER_OF_OPCODES*2+10)) #else #define VALID_INSTR(IP) \ ((SWord)LabelAddr(emulator_loop) <= (SWord)(IP) && \ |