mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 15:32:10 +08:00
fix -Wconversion issues in util tests
Change-Id: I51a57df459f8f3a79f7d2df7a823820bccb55bd0 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2832209 Reviewed-by: Francois Rousseau <frousseau@google.com> Commit-Queue: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
7743306709
commit
2c1261fca7
@ -133,7 +133,7 @@ void TestGzipDeflateInflate(const std::string& string) {
|
||||
std::string MakeString(size_t size) {
|
||||
std::string string;
|
||||
for (size_t i = 0; i < size; ++i) {
|
||||
string.append(1, (i % 256) ^ ((i >> 8) % 256));
|
||||
string.append(1, static_cast<char>((i % 256) ^ ((i >> 8) % 256)));
|
||||
}
|
||||
return string;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ void DoChildReadTestSetup(size_t* region_size,
|
||||
*region_size = 4 * base::GetPageSize();
|
||||
region->reset(new char[*region_size]);
|
||||
for (size_t index = 0; index < *region_size; ++index) {
|
||||
(*region)[index] = index % 256;
|
||||
(*region)[index] = static_cast<char>(index % 256);
|
||||
}
|
||||
}
|
||||
|
||||
@ -367,7 +367,7 @@ TEST(ProcessMemory, ReadCStringSizeLimitedChild) {
|
||||
void DoReadUnmappedChildMainSetup(void* page) {
|
||||
char* region = reinterpret_cast<char*>(page);
|
||||
for (size_t index = 0; index < base::GetPageSize(); ++index) {
|
||||
region[index] = index % 256;
|
||||
region[index] = static_cast<char>(index % 256);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user