Use size_t for length in wvcrc32
(This is a merge of http://go/wvgerrit/134311.) This patch widens the variable type used for lengths in wvcrc32 from int to size_t. This fixes code that would trigger -Wshorten-64-to-32 by implicitly narrowing a variable from 64 to 32 bits. Bug: 194971260 Test: x86-64 Change-Id: I2887c18ff2a2c6dd3d65f966d9d1203fb050f736
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
|
||||
namespace wvoec {
|
||||
|
||||
uint32_t wvcrc32(const uint8_t* p_begin, int i_count);
|
||||
uint32_t wvcrc32(const uint8_t* p_begin, size_t i_count);
|
||||
uint32_t wvcrc32Init();
|
||||
uint32_t wvcrc32Cont(const uint8_t* p_begin, int i_count, uint32_t prev_crc);
|
||||
uint32_t wvcrc32Cont(const uint8_t* p_begin, size_t i_count, uint32_t prev_crc);
|
||||
|
||||
// Convert to network byte order
|
||||
uint32_t wvcrc32n(const uint8_t* p_begin, int i_count);
|
||||
uint32_t wvcrc32n(const uint8_t* p_begin, size_t i_count);
|
||||
|
||||
} // namespace wvoec
|
||||
|
||||
|
||||
Reference in New Issue
Block a user