mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adding fixes for signedness warnings in libsolidity
Co-authored-by: Kamil Śliwak <kamil.sliwak@codepoets.it>
This commit is contained in:
co-authored by
Kamil Śliwak
parent
0a5d99279d
commit
c6e4943089
@@ -116,21 +116,21 @@ TestCase::TestResult SMTCheckerJSONTest::run(ostream& _stream, string const& _li
|
||||
!location["end"].isInt()
|
||||
)
|
||||
BOOST_THROW_EXCEPTION(runtime_error("Error must have a SourceLocation with start and end."));
|
||||
int start = location["start"].asInt();
|
||||
int end = location["end"].asInt();
|
||||
size_t start = location["start"].asUInt();
|
||||
size_t end = location["end"].asUInt();
|
||||
std::string sourceName;
|
||||
if (location.isMember("source") && location["source"].isString())
|
||||
sourceName = location["source"].asString();
|
||||
if (start >= static_cast<int>(preamble.size()))
|
||||
if (start >= preamble.size())
|
||||
start -= preamble.size();
|
||||
if (end >= static_cast<int>(preamble.size()))
|
||||
if (end >= preamble.size())
|
||||
end -= preamble.size();
|
||||
m_errorList.emplace_back(SyntaxTestError{
|
||||
error["type"].asString(),
|
||||
error["message"].asString(),
|
||||
sourceName,
|
||||
start,
|
||||
end
|
||||
static_cast<int>(start),
|
||||
static_cast<int>(end)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user