Skip to content

Commit a53f15f

Browse files
authored
Merge pull request #13240 from derekg/test-fix
Fix C++ compilation errors on 32-bit Raspbian due to `unsigned` -> `int` conversion
2 parents d4e2c2c + 3f62ab0 commit a53f15f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/Metadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class TinyCBORParser
136136
}
137137
bytes readBytes(unsigned length)
138138
{
139-
bytes ret{m_metadata.begin() + m_pos, m_metadata.begin() + m_pos + length};
139+
bytes ret{m_metadata.begin() + static_cast<int>(m_pos), m_metadata.begin() + static_cast<int>(m_pos + length)};
140140
m_pos += length;
141141
return ret;
142142
}

test/libevmasm/Optimiser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ namespace
141141
ControlFlowGraph cfg(output);
142142
AssemblyItems optItems;
143143
for (BasicBlock const& block: cfg.optimisedBlocks())
144-
copy(output.begin() + block.begin, output.begin() + block.end,
144+
copy(output.begin() + static_cast<int>(block.begin), output.begin() + static_cast<int>(block.end),
145145
back_inserter(optItems));
146146
output = move(optItems);
147147
}

test/libsolidity/util/TestFileParser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class TestFileParser
9898
void advance(unsigned n = 1)
9999
{
100100
solAssert(m_char != m_source.end(), "Cannot advance beyond end.");
101-
m_char = std::next(m_char, n);
101+
m_char = std::next(m_char, static_cast<int>(n));
102102
}
103103

104104
/// Returns the current character or '\0' if at end of input.

0 commit comments

Comments
 (0)