0

Add explicit type conversions where necessary: rlz/

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: Ia2d9fe5264e0f3f2b6ea3f9206c0d66fcc222d45
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2947954
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#890747}
This commit is contained in:
Peter Kasting
2021-06-09 14:20:31 +00:00
committed by Chromium LUCI CQ
parent ef327eeb24
commit 0f270fa767

@ -16,7 +16,7 @@ TEST(Crc32Unittest, ByteTest) {
// Externally calculated at http://crc32-checksum.waraxe.us/
int crc;
} kData[] = {
{"Hello", 5, 0xF7D18982},
{"Hello", 5, static_cast<int>(0xF7D18982)},
{"Google", 6, 0x62B0F067},
{"", 0, 0x0},
{"One more string.", 16, 0x0CA14970},
@ -35,11 +35,11 @@ TEST(Crc32Unittest, CharTest) {
// Externally calculated at http://crc32-checksum.waraxe.us/
int crc;
} kData[] = {
{"Hello", 0xF7D18982},
{"Hello", static_cast<int>(0xF7D18982)},
{"Google", 0x62B0F067},
{"", 0x0},
{"One more string.", 0x0CA14970},
{"Google\r\n", 0x83A3E860},
{"Google\r\n", static_cast<int>(0x83A3E860)},
{nullptr, 0x0},
};