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

Unified Diff: ppapi/tests/test_network_monitor.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_memory.cc ('k') | ppapi/tests/test_post_message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/tests/test_network_monitor.cc
diff --git a/ppapi/tests/test_network_monitor.cc b/ppapi/tests/test_network_monitor.cc
index 2d46f90eb04c1d85719f2228b0e8436ecc03cbab..dcb712c14e35ade3ad2194e78de85799173ce5f6 100644
--- a/ppapi/tests/test_network_monitor.cc
+++ b/ppapi/tests/test_network_monitor.cc
@@ -64,7 +64,7 @@ std::string TestNetworkMonitor::VerifyNetworkList(
for (size_t iface = 0; iface < count; ++iface) {
// Verify that the first interface has at least one address.
std::vector<pp::NetAddress> addresses;
- network_list.GetIpAddresses(iface, &addresses);
+ network_list.GetIpAddresses(static_cast<uint32_t>(iface), &addresses);
ASSERT_TRUE(addresses.size() >= 1U);
// Verify that the addresses are valid.
for (size_t i = 0; i < addresses.size(); ++i) {
@@ -115,14 +115,17 @@ std::string TestNetworkMonitor::VerifyNetworkList(
}
// Verify that each interface has a unique name and a display name.
- ASSERT_FALSE(network_list.GetName(iface).empty());
- ASSERT_FALSE(network_list.GetDisplayName(iface).empty());
+ ASSERT_FALSE(network_list.GetName(static_cast<uint32_t>(iface)).empty());
+ ASSERT_FALSE(network_list.GetDisplayName(
+ static_cast<uint32_t>(iface)).empty());
- PP_NetworkList_Type type = network_list.GetType(iface);
+ PP_NetworkList_Type type =
+ network_list.GetType(static_cast<uint32_t>(iface));
ASSERT_TRUE(type >= PP_NETWORKLIST_TYPE_UNKNOWN);
ASSERT_TRUE(type <= PP_NETWORKLIST_TYPE_CELLULAR);
- PP_NetworkList_State state = network_list.GetState(iface);
+ PP_NetworkList_State state =
+ network_list.GetState(static_cast<uint32_t>(iface));
ASSERT_TRUE(state >= PP_NETWORKLIST_STATE_DOWN);
ASSERT_TRUE(state <= PP_NETWORKLIST_STATE_UP);
}
« no previous file with comments | « ppapi/tests/test_memory.cc ('k') | ppapi/tests/test_post_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698