From 8e3a26aaf2392d784ba6d5cbb696da926230a722 Mon Sep 17 00:00:00 2001 From: pkasting Date: Fri, 3 Oct 2014 11:52:29 -0700 Subject: Fix more MSVC warnings, courgette/ edition. This is mostly about changing types and inserting casts so as to avoid implicit value truncations. BUG=81439 TEST=none Review URL: https://codereview.chromium.org/613893002 Cr-Commit-Position: refs/heads/master@{#298069} --- courgette/disassembler_elf_32_arm.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'courgette/disassembler_elf_32_arm.cc') diff --git a/courgette/disassembler_elf_32_arm.cc b/courgette/disassembler_elf_32_arm.cc index f0f94b9..800a64c 100644 --- a/courgette/disassembler_elf_32_arm.cc +++ b/courgette/disassembler_elf_32_arm.cc @@ -38,7 +38,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva, fflush(stdout); (*addr) = temp; - (*c_op) = (arm_op >> 8) | 0x1000; + (*c_op) = static_cast(arm_op >> 8) | 0x1000; break; } case ARM_OFF11: { @@ -50,7 +50,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva, temp += 4; // Offset from _next_ PC. (*addr) = temp; - (*c_op) = (arm_op >> 11) | 0x2000; + (*c_op) = static_cast(arm_op >> 11) | 0x2000; break; } case ARM_OFF24: { @@ -101,7 +101,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva, temp2 |= (arm_op & (1 << 15)) >> 13; temp2 |= (arm_op & 0xF8000000) >> 24; temp2 |= (prefetch & 0x0000000F) << 8; - (*c_op) = temp2; + (*c_op) = static_cast(temp2); break; } case ARM_OFF21: { @@ -122,7 +122,7 @@ CheckBool DisassemblerElf32ARM::Compress(ARM_RVA type, uint32 arm_op, RVA rva, uint32 temp2 = 0x5000; temp2 |= (arm_op & 0x03C00000) >> 22; // just save the cond - (*c_op) = temp2; + (*c_op) = static_cast(temp2); break; } default: -- cgit v1.1