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

Unified Diff: chrome/utility/media_galleries/pmp_column_reader_unittest.cc

Issue 377683002: Fixes for re-enabling more MSVC level 4 warnings: chrome/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/utility/media_galleries/pmp_column_reader_unittest.cc
diff --git a/chrome/utility/media_galleries/pmp_column_reader_unittest.cc b/chrome/utility/media_galleries/pmp_column_reader_unittest.cc
index f4f178235c9b6d220c7c5e92a98d43f3a2b44cb0..7c9bb6f3fce31d0e478dfec1d3a74a30bc5eb908 100644
--- a/chrome/utility/media_galleries/pmp_column_reader_unittest.cc
+++ b/chrome/utility/media_galleries/pmp_column_reader_unittest.cc
@@ -140,7 +140,7 @@ TEST(PmpColumnReaderTest, HeaderParsingAndValidation) {
PmpColumnReader reader_bad_magic_bytes;
std::vector<char> bad_magic_bytes =
PmpTestUtil::MakeHeader(PMP_TYPE_STRING, 0);
- bad_magic_bytes[0] = (char)0xff;
+ bad_magic_bytes[0] = static_cast<char>(-128);
Peter Kasting 2014/07/07 20:55:46 0xff is considered by the compiler to be a positiv
EXPECT_FALSE(InitColumnReaderFromBytes(&reader_bad_magic_bytes,
bad_magic_bytes,
PMP_TYPE_STRING));
@@ -148,7 +148,7 @@ TEST(PmpColumnReaderTest, HeaderParsingAndValidation) {
PmpColumnReader reader_inconsistent_types;
std::vector<char> inconsistent_type =
PmpTestUtil::MakeHeader(PMP_TYPE_STRING, 0);
- inconsistent_type[kPmpFieldType1Offset] = (char)0xff;
+ inconsistent_type[kPmpFieldType1Offset] = static_cast<char>(-128);
EXPECT_FALSE(InitColumnReaderFromBytes(&reader_inconsistent_types,
inconsistent_type,
PMP_TYPE_STRING));
@@ -156,8 +156,8 @@ TEST(PmpColumnReaderTest, HeaderParsingAndValidation) {
PmpColumnReader reader_invalid_type;
std::vector<char> invalid_type =
PmpTestUtil::MakeHeader(PMP_TYPE_STRING, 0);
- invalid_type[kPmpFieldType1Offset] = (char)0xff;
- invalid_type[kPmpFieldType2Offset] = (char)0xff;
+ invalid_type[kPmpFieldType1Offset] = static_cast<char>(-128);
+ invalid_type[kPmpFieldType2Offset] = static_cast<char>(-128);
EXPECT_FALSE(InitColumnReaderFromBytes(&reader_invalid_type,
invalid_type,
PMP_TYPE_STRING));
« no previous file with comments | « chrome/test/chromedriver/session_commands.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698