aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2014-11-06 06:17:05 +0800
committerGav Wood <i@gavwood.com>2014-11-06 06:17:05 +0800
commit4b9dcd95ce5a33440de5014896bfeb99f6436c76 (patch)
tree5d8a0528f67145a487e82937593bb78bdb8356a8
parent67d0ea5cc1bccf2c32cf72f0184ebecb5c64dda5 (diff)
downloaddexon-solidity-4b9dcd95ce5a33440de5014896bfeb99f6436c76.tar.gz
dexon-solidity-4b9dcd95ce5a33440de5014896bfeb99f6436c76.tar.zst
dexon-solidity-4b9dcd95ce5a33440de5014896bfeb99f6436c76.zip
Compile warnings fixed.
-rw-r--r--solidityCompiler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/solidityCompiler.cpp b/solidityCompiler.cpp
index 17de9af5..69d33133 100644
--- a/solidityCompiler.cpp
+++ b/solidityCompiler.cpp
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(different_argument_numbers)
byte(Instruction::DUP3),
byte(Instruction::SWAP1), // assign b to d
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0xa + shift, // jump to return
+ byte(Instruction::PUSH1), byte(0xa + shift), // jump to return
byte(Instruction::JUMP),
byte(Instruction::JUMPDEST),
byte(Instruction::SWAP4), // store d and fetch return address
@@ -119,11 +119,11 @@ BOOST_AUTO_TEST_CASE(different_argument_numbers)
byte(Instruction::JUMPDEST), // beginning of g
byte(Instruction::PUSH1), 0x0,
byte(Instruction::DUP1), // initialized e and h
- byte(Instruction::PUSH1), 0x20 + shift, // ret address
+ byte(Instruction::PUSH1), byte(0x20 + shift), // ret address
byte(Instruction::PUSH1), 0x1,
byte(Instruction::PUSH1), 0x2,
byte(Instruction::PUSH1), 0x3,
- byte(Instruction::PUSH1), 0x1 + shift,
+ byte(Instruction::PUSH1), byte(0x1 + shift),
// stack here: ret e h 0x20 1 2 3 0x1
byte(Instruction::JUMP),
byte(Instruction::JUMPDEST),
@@ -158,24 +158,24 @@ BOOST_AUTO_TEST_CASE(ifStatement)
bytes expectation({byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x0,
byte(Instruction::DUP1),
- byte(Instruction::PUSH1), 0x1b + shift, // "true" target
+ byte(Instruction::PUSH1), byte(0x1b + shift), // "true" target
byte(Instruction::JUMPI),
// new check "else if" condition
byte(Instruction::DUP1),
byte(Instruction::ISZERO),
- byte(Instruction::PUSH1), 0x13 + shift,
+ byte(Instruction::PUSH1), byte(0x13 + shift),
byte(Instruction::JUMPI),
// "else" body
byte(Instruction::PUSH1), 0x4f,
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0x17 + shift, // exit path of second part
+ byte(Instruction::PUSH1), byte(0x17 + shift), // exit path of second part
byte(Instruction::JUMP),
// "else if" body
byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x4e,
byte(Instruction::POP),
byte(Instruction::JUMPDEST),
- byte(Instruction::PUSH1), 0x1f + shift,
+ byte(Instruction::PUSH1), byte(0x1f + shift),
byte(Instruction::JUMP),
// "if" body
byte(Instruction::JUMPDEST),
@@ -201,23 +201,23 @@ BOOST_AUTO_TEST_CASE(loops)
byte(Instruction::JUMPDEST),
byte(Instruction::PUSH1), 0x1,
byte(Instruction::ISZERO),
- byte(Instruction::PUSH1), 0x21 + shift,
+ byte(Instruction::PUSH1), byte(0x21 + shift),
byte(Instruction::JUMPI),
byte(Instruction::PUSH1), 0x1,
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0x21 + shift,
+ byte(Instruction::PUSH1), byte(0x21 + shift),
byte(Instruction::JUMP), // break
byte(Instruction::PUSH1), 0x2,
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0x2 + shift,
+ byte(Instruction::PUSH1), byte(0x2 + shift),
byte(Instruction::JUMP), // continue
byte(Instruction::PUSH1), 0x3,
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0x22 + shift,
+ byte(Instruction::PUSH1), byte(0x22 + shift),
byte(Instruction::JUMP), // return
byte(Instruction::PUSH1), 0x4,
byte(Instruction::POP),
- byte(Instruction::PUSH1), 0x2 + shift,
+ byte(Instruction::PUSH1), byte(0x2 + shift),
byte(Instruction::JUMP),
byte(Instruction::JUMPDEST),
byte(Instruction::JUMPDEST),