diff options
author | brettw <brettw@chromium.org> | 2015-02-13 13:17:38 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-13 21:18:03 +0000 |
commit | 669d47b1bf59279718ab6ef07e9eb69fb42c8aa4 (patch) | |
tree | b15811ec34801807c35d73a74f8ef6b72d10f768 /ppapi/proxy/ppb_var_unittest.cc | |
parent | fb2a760558d423c55722e2a6f36d9c805f4eb9b6 (diff) | |
download | chromium_src-669d47b1bf59279718ab6ef07e9eb69fb42c8aa4.zip chromium_src-669d47b1bf59279718ab6ef07e9eb69fb42c8aa4.tar.gz chromium_src-669d47b1bf59279718ab6ef07e9eb69fb42c8aa4.tar.bz2 |
Enable size_t to int truncation warnings in PPAPI
Also removed a few extra "-Wpedantic" warnings in ppapi_cpp. I don't see a good justification why this should be different than the rest of the project.
Fix GN error in media.
NOPRESUBMIT=true
Review URL: https://codereview.chromium.org/915403003
Cr-Commit-Position: refs/heads/master@{#316289}
Diffstat (limited to 'ppapi/proxy/ppb_var_unittest.cc')
-rw-r--r-- | ppapi/proxy/ppb_var_unittest.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ppapi/proxy/ppb_var_unittest.cc b/ppapi/proxy/ppb_var_unittest.cc index 5e25379..98b6428 100644 --- a/ppapi/proxy/ppb_var_unittest.cc +++ b/ppapi/proxy/ppb_var_unittest.cc @@ -33,7 +33,7 @@ class PPB_VarTest : public PluginProxyTest { ppb_var_(ppapi::PPB_Var_Shared::GetVarInterface1_2()) { // Set the value of test_strings_[i] to "i". for (size_t i = 0; i < kNumStrings; ++i) - test_strings_[i] = base::IntToString(i); + test_strings_[i] = base::IntToString(static_cast<int>(i)); } protected: std::vector<std::string> test_strings_; @@ -44,8 +44,9 @@ class PPB_VarTest : public PluginProxyTest { // Test basic String operations. TEST_F(PPB_VarTest, Strings) { for (size_t i = 0; i < kNumStrings; ++i) { - vars_[i] = ppb_var_->VarFromUtf8(test_strings_[i].c_str(), - test_strings_[i].length()); + vars_[i] = ppb_var_->VarFromUtf8( + test_strings_[i].c_str(), + static_cast<uint32_t>(test_strings_[i].length())); EXPECT_EQ(test_strings_[i], VarToString(vars_[i], ppb_var_)); } // At this point, they should each have a ref count of 1. Add some more. @@ -104,8 +105,9 @@ class CreateVarThreadDelegate : public base::PlatformThread::Delegate { virtual void ThreadMain() { const PPB_Var* ppb_var = ppapi::PPB_Var_Shared::GetVarInterface1_2(); for (size_t i = 0; i < size_; ++i) { - vars_out_[i] = ppb_var->VarFromUtf8(strings_in_[i].c_str(), - strings_in_[i].length()); + vars_out_[i] = ppb_var->VarFromUtf8( + strings_in_[i].c_str(), + static_cast<uint32_t>(strings_in_[i].length())); strings_out_[i] = VarToString(vars_out_[i], ppb_var); } } |