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

Unified Diff: ppapi/tests/test_flash_clipboard.cc

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 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 | « ppapi/tests/test_file_mapping.cc ('k') | ppapi/tests/test_flash_file.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_flash_clipboard.cc
diff --git a/ppapi/tests/test_flash_clipboard.cc b/ppapi/tests/test_flash_clipboard.cc
index 505399d29e93f2d6f4ccc9ccbaa047a4706f06ae..e94cb7fb13ffa3b1a6ab44189318133ac094fd2c 100644
--- a/ppapi/tests/test_flash_clipboard.cc
+++ b/ppapi/tests/test_flash_clipboard.cc
@@ -151,7 +151,7 @@ std::string TestFlashClipboard::TestReadWriteRTF() {
"{\\rtf1\\ansi{\\fonttbl\\f0\\fswiss Helvetica;}\\f0\\pard\n"
"This is some {\\b bold} text.\\par\n"
"}";
- pp::VarArrayBuffer array_buffer(rtf_string.size());
+ pp::VarArrayBuffer array_buffer(static_cast<uint32_t>(rtf_string.size()));
char* bytes = static_cast<char*>(array_buffer.Map());
std::copy(rtf_string.data(), rtf_string.data() + rtf_string.size(), bytes);
std::vector<uint32_t> formats_vector(1, PP_FLASH_CLIPBOARD_FORMAT_RTF);
@@ -182,7 +182,7 @@ std::string TestFlashClipboard::TestReadWriteRTF() {
std::string TestFlashClipboard::TestReadWriteCustomData() {
std::string custom_data = "custom_data";
- pp::VarArrayBuffer array_buffer(custom_data.size());
+ pp::VarArrayBuffer array_buffer(static_cast<uint32_t>(custom_data.size()));
char* bytes = static_cast<char*>(array_buffer.Map());
std::copy(custom_data.begin(), custom_data.end(), bytes);
uint32_t format_id =
@@ -311,7 +311,7 @@ std::string TestFlashClipboard::TestGetSequenceNumber() {
// Test the sequence number changes after writing some custom data.
std::string custom_data = "custom_data";
- pp::VarArrayBuffer array_buffer(custom_data.size());
+ pp::VarArrayBuffer array_buffer(static_cast<uint32_t>(custom_data.size()));
char* bytes = static_cast<char*>(array_buffer.Map());
std::copy(custom_data.begin(), custom_data.end(), bytes);
uint32_t format_id =
« no previous file with comments | « ppapi/tests/test_file_mapping.cc ('k') | ppapi/tests/test_flash_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698