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

Unified Diff: content/browser/indexed_db/indexed_db_leveldb_coding.cc

Issue 1485023003: Misc truncation fixes for gn builds with VS 2015 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes to four more components/content files Created 5 years 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
Index: content/browser/indexed_db/indexed_db_leveldb_coding.cc
diff --git a/content/browser/indexed_db/indexed_db_leveldb_coding.cc b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
index f4d01dec591a6107113f547bc12b80b71d3ccd83..ccf792cacc73409e7ea7accd4b8f9c2bcb1f4438 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_coding.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_coding.cc
@@ -1251,11 +1251,11 @@ std::string KeyPrefix::EncodeInternal(int64 database_id,
DCHECK(object_store_id_string.size() <= kMaxObjectStoreIdSizeBytes);
DCHECK(index_id_string.size() <= kMaxIndexIdSizeBytes);
- unsigned char first_byte =
+ unsigned char first_byte = static_cast<char>(
(database_id_string.size() - 1) << (kMaxObjectStoreIdSizeBits +
kMaxIndexIdSizeBits) |
(object_store_id_string.size() - 1) << kMaxIndexIdSizeBits |
- (index_id_string.size() - 1);
+ (index_id_string.size() - 1));
static_assert(kMaxDatabaseIdSizeBits + kMaxObjectStoreIdSizeBits +
kMaxIndexIdSizeBits ==
sizeof(first_byte) * 8,
« no previous file with comments | « content/browser/accessibility/browser_accessibility_win.cc ('k') | content/browser/renderer_host/p2p/socket_host_tcp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698