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

Unified Diff: media/cdm/cenc_utils_unittest.cc

Issue 1559013002: Fix possible loss of data warnings in media_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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: media/cdm/cenc_utils_unittest.cc
diff --git a/media/cdm/cenc_utils_unittest.cc b/media/cdm/cenc_utils_unittest.cc
index beab6edaf2b9fb5a452437f06032020850f3ae91..c124cbd2d21d686473636b8e22f522af38a29593 100644
--- a/media/cdm/cenc_utils_unittest.cc
+++ b/media/cdm/cenc_utils_unittest.cc
@@ -159,9 +159,9 @@ class CencUtilsTest : public testing::Test {
// and simply appends the data to the end of it. It updates the box size
// and sets the data size.
DCHECK(data.size() < 100);
- pssh_box[3] += data.size();
+ pssh_box[3] += static_cast<uint8_t>(data.size());
pssh_box.pop_back();
- pssh_box.push_back(data.size());
+ pssh_box.push_back(static_cast<uint8_t>(data.size()));
pssh_box.insert(pssh_box.end(), data.begin(), data.end());
}
@@ -284,7 +284,7 @@ TEST_F(CencUtilsTest, PsshBoxLargerThanSize) {
// Add 20 additional bytes to |box|.
size_t original_size = box.size();
for (size_t i = 0; i < 20; ++i)
- box.push_back(i);
+ box.push_back(static_cast<uint8_t>(i));
// Tries every size greater than |original_size|.
for (size_t i = original_size + 1; i < box.size(); ++i) {
« 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