mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding fixes for signedness conversion warnings in libyul
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
co-authored by
Kamil Śliwak
parent
21a9d3dd21
commit
33e7b24df0
@@ -376,12 +376,12 @@ bytes BinaryTransform::operator()(BuiltinCall const& _call)
|
||||
if (_call.functionName == "dataoffset")
|
||||
{
|
||||
string name = get<StringLiteral>(_call.arguments.at(0)).value;
|
||||
return toBytes(Opcode::I64Const) + lebEncodeSigned(m_subModulePosAndSize.at(name).first);
|
||||
return toBytes(Opcode::I64Const) + lebEncodeSigned(static_cast<int64_t>(m_subModulePosAndSize.at(name).first));
|
||||
}
|
||||
else if (_call.functionName == "datasize")
|
||||
{
|
||||
string name = get<StringLiteral>(_call.arguments.at(0)).value;
|
||||
return toBytes(Opcode::I64Const) + lebEncodeSigned(m_subModulePosAndSize.at(name).second);
|
||||
return toBytes(Opcode::I64Const) + lebEncodeSigned(static_cast<int64_t>(m_subModulePosAndSize.at(name).second));
|
||||
}
|
||||
|
||||
bytes args = visit(_call.arguments);
|
||||
|
||||
Reference in New Issue
Block a user