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

Unified Diff: ppapi/proxy/pdf_resource.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: 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
Index: ppapi/proxy/pdf_resource.cc
diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc
index 7d20d91026fc88b68cc44dc841985788a65b3fc5..aa185229957fee62977df747b9122f3b2f3fac6d 100644
--- a/ppapi/proxy/pdf_resource.cc
+++ b/ppapi/proxy/pdf_resource.cc
@@ -92,13 +92,13 @@ void PDFResource::SearchString(const unsigned short* input_string,
size_t matched_length = usearch_getMatchedLength(searcher);
PP_PrivateFindResult result;
result.start_index = match_start;
- result.length = matched_length;
+ result.length = static_cast<uint32_t>(matched_length);
pp_results.push_back(result);
match_start = usearch_next(searcher, &status);
DCHECK(status == U_ZERO_ERROR);
}
- *count = pp_results.size();
+ *count = static_cast<uint32_t>(pp_results.size());
if (*count) {
*results = reinterpret_cast<PP_PrivateFindResult*>(malloc(
*count * sizeof(PP_PrivateFindResult)));

Powered by Google App Engine
This is Rietveld 408576698