diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-08 13:13:08 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-03-16 15:20:15 +0100 |
commit | 9650eff615a19f2cda06760b2e475b24e8faae2b (patch) | |
tree | d6f721dc42817e673e31fd1dff72500d31762553 /chromium/components/crx_file/crx_creator.cc | |
parent | 293f42fdc453074c627a62829602421e0ff75be6 (diff) | |
download | qtwebengine-chromium-9650eff615a19f2cda06760b2e475b24e8faae2b.tar.gz |
Fix misuse of {} initialization
Narrowing is supposed to be forbidden in {} initialization, but Chromium
doesn't appear to care upstream.
Change-Id: Ia3d1dac6ef19ef86afcbeee4ed11d807c53faaaa
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/components/crx_file/crx_creator.cc')
-rw-r--r-- | chromium/components/crx_file/crx_creator.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chromium/components/crx_file/crx_creator.cc b/chromium/components/crx_file/crx_creator.cc index 8ec6bb3691e..c37b680071f 100644 --- a/chromium/components/crx_file/crx_creator.cc +++ b/chromium/components/crx_file/crx_creator.cc @@ -74,8 +74,8 @@ CreatorResult Create(const base::FilePath& output_path, signed_header_data.SerializeAsString(); const int signed_header_size = signed_header_data_str.size(); const uint8_t signed_header_size_octets[] = { - signed_header_size, signed_header_size >> 8, signed_header_size >> 16, - signed_header_size >> 24}; + uint8_t(signed_header_size), uint8_t(signed_header_size >> 8), + uint8_t(signed_header_size >> 16), uint8_t(signed_header_size >> 24)}; // Create a signer, init with purpose, SignedData length, run SignedData // through, run ZIP through. @@ -104,8 +104,9 @@ CreatorResult Create(const base::FilePath& output_path, header.set_signed_header_data(signed_header_data_str); const std::string header_str = header.SerializeAsString(); const int header_size = header_str.size(); - const uint8_t header_size_octets[] = {header_size, header_size >> 8, - header_size >> 16, header_size >> 24}; + const uint8_t header_size_octets[] = { + uint8_t(header_size), uint8_t(header_size >> 8), + uint8_t(header_size >> 16), uint8_t(header_size >> 24)}; // Write CRX. const uint8_t format_version_octets[] = {3, 0, 0, 0}; |