summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/base/auth_cache_unittest.cc2
-rw-r--r--net/base/mime_util.cc10
-rw-r--r--net/disk_cache/backend_impl.cc3
-rw-r--r--net/disk_cache/entry_impl.cc5
-rw-r--r--net/http/http_chunked_decoder_unittest.cc2
5 files changed, 12 insertions, 10 deletions
diff --git a/net/base/auth_cache_unittest.cc b/net/base/auth_cache_unittest.cc
index 1989e07..f434272 100644
--- a/net/base/auth_cache_unittest.cc
+++ b/net/base/auth_cache_unittest.cc
@@ -65,7 +65,7 @@ TEST(AuthCacheTest, HttpKey) {
"https://www.nowhere.org/WallyWorld"
};
- for (int i = 0; i < arraysize(url); i++) {
+ for (size_t i = 0; i < arraysize(url); i++) {
std::string key = net::AuthCache::HttpKey(GURL(url[i]), *auth_info);
EXPECT_EQ(expected[i], key);
}
diff --git a/net/base/mime_util.cc b/net/base/mime_util.cc
index 78037ce..68408b2 100644
--- a/net/base/mime_util.cc
+++ b/net/base/mime_util.cc
@@ -233,19 +233,19 @@ static const char* view_source_types[] = {
};
void MimeUtil::InitializeMimeTypeMaps() {
- for (int i = 0; i < arraysize(supported_image_types); ++i)
+ for (size_t i = 0; i < arraysize(supported_image_types); ++i)
image_map_.insert(supported_image_types[i]);
// Initialize the supported non-image types
- for (int i = 0; i < arraysize(supported_non_image_types); ++i)
+ for (size_t i = 0; i < arraysize(supported_non_image_types); ++i)
non_image_map_.insert(supported_non_image_types[i]);
- for (int i = 0; i < arraysize(supported_javascript_types); ++i)
+ for (size_t i = 0; i < arraysize(supported_javascript_types); ++i)
non_image_map_.insert(supported_javascript_types[i]);
- for (int i = 0; i < arraysize(supported_javascript_types); ++i)
+ for (size_t i = 0; i < arraysize(supported_javascript_types); ++i)
javascript_map_.insert(supported_javascript_types[i]);
- for (int i = 0; i < arraysize(view_source_types); ++i)
+ for (size_t i = 0; i < arraysize(view_source_types); ++i)
view_source_map_.insert(view_source_types[i]);
}
diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc
index 1845870..74eabbc 100644
--- a/net/disk_cache/backend_impl.cc
+++ b/net/disk_cache/backend_impl.cc
@@ -316,7 +316,8 @@ bool BackendImpl::CreateEntry(const std::string& key, Entry** entry) {
int num_blocks;
size_t key1_len = sizeof(EntryStore) - offsetof(EntryStore, key);
- if (key.size() < key1_len || key.size() > kMaxInternalKeyLength)
+ if (key.size() < key1_len ||
+ key.size() > static_cast<size_t>(kMaxInternalKeyLength))
num_blocks = 1;
else
num_blocks = static_cast<int>((key.size() - key1_len) / 256 + 2);
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
index 4baa869..19dcae8 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/entry_impl.cc
@@ -442,7 +442,8 @@ bool EntryImpl::CreateEntry(Addr node_address, const std::string& key,
}
bool EntryImpl::IsSameEntry(const std::string& key, uint32 hash) {
- if (entry_.Data()->hash != hash || entry_.Data()->key_len != key.size())
+ if (entry_.Data()->hash != hash ||
+ static_cast<size_t>(entry_.Data()->key_len) != key.size())
return false;
std::string my_key = GetKey();
@@ -756,7 +757,7 @@ bool EntryImpl::Flush(int index, int size, bool async) {
offset = address.start_block() * address.BlockSize() + kBlockHeaderSize;
// We just told the backend to store len bytes for real.
- DCHECK(len == unreported_size_[index]);
+ DCHECK(len == static_cast<size_t>(unreported_size_[index]));
backend_->ModifyStorageSize(0, static_cast<int>(len));
unreported_size_[index] = 0;
diff --git a/net/http/http_chunked_decoder_unittest.cc b/net/http/http_chunked_decoder_unittest.cc
index 3773fef..5c859db 100644
--- a/net/http/http_chunked_decoder_unittest.cc
+++ b/net/http/http_chunked_decoder_unittest.cc
@@ -288,4 +288,4 @@ TEST(HttpChunkedDecoderTest, InvalidConsecutiveCRLFs) {
"0\r\n\r\n"
};
RunTestUntilFailure(inputs, arraysize(inputs), 1);
-} \ No newline at end of file
+}