Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | Add explicit static cast to fix narrowing warning |
| 2 | |
| 3 | Fixes |
| 4 | deps/v8/src/codegen/mips/assembler-mips.cc:3556:44: error: non-constant-expression cannot be narrowed from type 'int' to 'size_t' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- a/deps/v8/src/codegen/mips/assembler-mips.cc |
| 10 | +++ b/deps/v8/src/codegen/mips/assembler-mips.cc |
| 11 | @@ -3553,7 +3553,7 @@ void Assembler::GrowBuffer() { |
| 12 | reloc_info_writer.last_pc() + pc_delta); |
| 13 | |
| 14 | // Relocate runtime entries. |
| 15 | - Vector<byte> instructions{buffer_start_, pc_offset()}; |
| 16 | + Vector<byte> instructions{buffer_start_, static_cast<size_t>(pc_offset())}; |
| 17 | Vector<const byte> reloc_info{reloc_info_writer.pos(), reloc_size}; |
| 18 | for (RelocIterator it(instructions, reloc_info, 0); !it.done(); it.next()) { |
| 19 | RelocInfo::Mode rmode = it.rinfo()->rmode(); |