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

Unified Diff: snapshot/cpu_context.cc

Issue 1408123006: Tidy up to enable C4800 on Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 years, 2 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 | « minidump/minidump_module_writer_test.cc ('k') | snapshot/win/system_snapshot_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: snapshot/cpu_context.cc
diff --git a/snapshot/cpu_context.cc b/snapshot/cpu_context.cc
index 82839db8ef977c7a6121d2a0a0a68185c444ff8d..1ff2b459242eff8cc4574ac97be65bd2ad310f07 100644
--- a/snapshot/cpu_context.cc
+++ b/snapshot/cpu_context.cc
@@ -40,7 +40,7 @@ uint16_t CPUContextX86::FxsaveToFsaveTagWord(
uint16_t fsave_tag = 0;
for (int physical_index = 0; physical_index < 8; ++physical_index) {
- bool fxsave_bit = fxsave_tag & (1 << physical_index);
+ bool fxsave_bit = (fxsave_tag & (1 << physical_index)) != 0;
uint8_t fsave_bits;
if (fxsave_bit) {
@@ -55,7 +55,7 @@ uint16_t CPUContextX86::FxsaveToFsaveTagWord(
fsave_bits = kX87TagSpecial;
} else {
// The integer bit the “J bit”.
- bool integer_bit = st[7] & 0x80;
+ bool integer_bit = (st[7] & 0x80) != 0;
if (exponent == 0) {
uint64_t fraction = ((implicit_cast<uint64_t>(st[7]) & 0x7f) << 56) |
(implicit_cast<uint64_t>(st[6]) << 48) |
« no previous file with comments | « minidump/minidump_module_writer_test.cc ('k') | snapshot/win/system_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698