Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: minidump/test/minidump_context_test_util.cc

Issue 897233002: win: truncation warnings in minidump_context_test_util.cc (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump_test-8
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/test/minidump_context_test_util.cc
diff --git a/minidump/test/minidump_context_test_util.cc b/minidump/test/minidump_context_test_util.cc
index 8d9ca31d748bab3fb163fbd46be35e248f7a7f81..b410cd5c8606c8716186eaa6ae1e51d4a7605748 100644
--- a/minidump/test/minidump_context_test_util.cc
+++ b/minidump/test/minidump_context_test_util.cc
@@ -119,9 +119,9 @@ void InitializeMinidumpContextAMD64(MinidumpContextAMD64* context,
context->r15 = value++;
context->rip = value++;
context->eflags = value++;
- context->cs = value++;
- context->fs = value++;
- context->gs = value++;
+ context->cs = static_cast<uint16_t>(value++);
+ context->fs = static_cast<uint16_t>(value++);
+ context->gs = static_cast<uint16_t>(value++);
InitializeCPUContextX86_64Fxsave(&context->fxsave, &value);
@@ -143,9 +143,9 @@ void InitializeMinidumpContextAMD64(MinidumpContextAMD64* context,
context->p4_home = value++;
context->p5_home = value++;
context->p6_home = value++;
- context->ds = value++;
- context->es = value++;
- context->ss = value++;
+ context->ds = static_cast<uint16_t>(value++);
+ context->es = static_cast<uint16_t>(value++);
+ context->ss = static_cast<uint16_t>(value++);
for (size_t index = 0; index < arraysize(context->vector_register); ++index) {
context->vector_register[index].lo = value++;
context->vector_register[index].hi = value++;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698