aboutsummaryrefslogtreecommitdiff
path: root/reloc_elf_unittest.cc
diff options
context:
space:
mode:
authorPeter Kasting <pkasting@chromium.org>2021-06-09 19:27:03 +0000
committerCopybara-Service <copybara-worker@google.com>2021-07-25 21:32:31 -0700
commit3865f0bceb04ae529ba0c2d98a869a16072a90c2 (patch)
treed27353ae58fbb351a7720038358a698ab82706bf /reloc_elf_unittest.cc
parent1cec5a775590551e3c9f950afad3d95a6f6d950f (diff)
downloadzucchini-3865f0bceb04ae529ba0c2d98a869a16072a90c2.tar.gz
Add explicit type conversions where necessary: components/
These are cases that are implicitly narrowing today, and must do so explicitly in order to enable -Wc++11-narrowing. No behavior change intended. Bug: 1216696 Change-Id: Ic8f194bb0ab9a247d3e84cc59a687285cdb96d48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2947886 Auto-Submit: Peter Kasting <pkasting@chromium.org> Commit-Queue: Jochen Eisinger <jochen@chromium.org> Reviewed-by: Jochen Eisinger <jochen@chromium.org> Cr-Commit-Position: refs/heads/master@{#890878} NOKEYCHECK=True GitOrigin-RevId: 379c52be13901beae4f773fe9e8054ad42a186c4
Diffstat (limited to 'reloc_elf_unittest.cc')
-rw-r--r--reloc_elf_unittest.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/reloc_elf_unittest.cc b/reloc_elf_unittest.cc
index ac5086a..b03f403 100644
--- a/reloc_elf_unittest.cc
+++ b/reloc_elf_unittest.cc
@@ -61,7 +61,8 @@ class FakeImageWithReloc {
const std::vector<RelocSpec>& reloc_specs)
: image_data_(image_size, 0xFF),
mutable_image_(&image_data_[0], image_data_.size()) {
- translator_.Initialize({{0, image_size, base_rva, image_size}});
+ translator_.Initialize({{0, static_cast<offset_t>(image_size), base_rva,
+ static_cast<rva_t>(image_size)}});
// Set up test image with reloc sections.
for (const RelocSpec& reloc_spec : reloc_specs) {
BufferRegion reloc_region = {reloc_spec.start, reloc_spec.data.size()};