diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 08:40:56 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-08 08:40:56 +0000 |
commit | 0ef486bd105ad367b055a3e9cc25cc67cf8d2a5d (patch) | |
tree | e88185e6c76c79dfb16d3c2050a1b2ef5c331dbf /courgette | |
parent | 6d3f32f41aee3b9cc81504fe2af668e03a8c3e06 (diff) | |
download | chromium_src-0ef486bd105ad367b055a3e9cc25cc67cf8d2a5d.zip chromium_src-0ef486bd105ad367b055a3e9cc25cc67cf8d2a5d.tar.gz chromium_src-0ef486bd105ad367b055a3e9cc25cc67cf8d2a5d.tar.bz2 |
Fixes for re-enabling more MSVC level 4 warnings: courgette/ edition
This contains fixes for the following sorts of issues:
* Signedness mismatch
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/371153002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'courgette')
-rw-r--r-- | courgette/disassembler_elf_32.h | 2 | ||||
-rw-r--r-- | courgette/disassembler_elf_32_arm.cc | 2 | ||||
-rw-r--r-- | courgette/encoded_program.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/courgette/disassembler_elf_32.h b/courgette/disassembler_elf_32.h index dc44ec5..58e2eba 100644 --- a/courgette/disassembler_elf_32.h +++ b/courgette/disassembler_elf_32.h @@ -30,7 +30,7 @@ class DisassemblerElf32 : public Disassembler { // class encapsulates this behavior. public for use in unit tests. class TypedRVA { public: - explicit TypedRVA(RVA rva) : rva_(rva), offset_(-1) { + explicit TypedRVA(RVA rva) : rva_(rva), offset_(static_cast<size_t>(-1)) { } virtual ~TypedRVA() { }; diff --git a/courgette/disassembler_elf_32_arm.cc b/courgette/disassembler_elf_32_arm.cc index dc3712f..f0f94b9 100644 --- a/courgette/disassembler_elf_32_arm.cc +++ b/courgette/disassembler_elf_32_arm.cc @@ -215,7 +215,7 @@ uint16 DisassemblerElf32ARM::TypedRVAARM::op_size() const { case ARM_OFF21: return 4; default: - return -1; + return 0xFFFF; } } diff --git a/courgette/encoded_program.cc b/courgette/encoded_program.cc index 8fb8c69..b78e7fe 100644 --- a/courgette/encoded_program.cc +++ b/courgette/encoded_program.cc @@ -710,7 +710,7 @@ COMPILE_ASSERT(offsetof(RelocBlockPOD, relocs) == 8, reloc_block_header_size); class RelocBlock { public: RelocBlock() { - pod.page_rva = ~0; + pod.page_rva = 0xFFFFFFFF; pod.block_size = 8; } |