Fixing signedness conversion warnings in libevmasm

Co-authored-by: Harikrishnan Mulackal <webmail.hari@gmail.com>
This commit is contained in:
Djordje Mijovic
2020-06-03 13:25:43 +02:00
co-authored by Harikrishnan Mulackal
parent b9f2697a3c
commit e4e3f49844
15 changed files with 98 additions and 93 deletions
+3 -3
View File
@@ -330,8 +330,8 @@ void solidity::evmasm::eachInstruction(
{
for (auto it = _mem.begin(); it < _mem.end(); ++it)
{
Instruction instr = Instruction(*it);
size_t additional = 0;
auto instr = Instruction(*it);
int additional = 0;
if (isValidInstruction(instr))
additional = instructionInfo(instr).additional;
@@ -357,7 +357,7 @@ string solidity::evmasm::disassemble(bytes const& _mem)
stringstream ret;
eachInstruction(_mem, [&](Instruction _instr, u256 const& _data) {
if (!isValidInstruction(_instr))
ret << "0x" << std::uppercase << std::hex << int(_instr) << " ";
ret << "0x" << std::uppercase << std::hex << static_cast<int>(_instr) << " ";
else
{
InstructionInfo info = instructionInfo(_instr);