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

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: 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/proxy/flash_clipboard_resource.cc ('k') | ppapi/proxy/platform_verification_private_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/pdf_resource.cc
diff --git a/ppapi/proxy/pdf_resource.cc b/ppapi/proxy/pdf_resource.cc
index 7d20d91026fc88b68cc44dc841985788a65b3fc5..e9d3ae893d718db7ffd8e0041c97a6802cf8c298 100644
--- a/ppapi/proxy/pdf_resource.cc
+++ b/ppapi/proxy/pdf_resource.cc
@@ -89,7 +89,7 @@ void PDFResource::SearchString(const unsigned short* input_string,
std::vector<PP_PrivateFindResult> pp_results;
while (match_start != USEARCH_DONE) {
- size_t matched_length = usearch_getMatchedLength(searcher);
+ int32_t matched_length = usearch_getMatchedLength(searcher);
PP_PrivateFindResult result;
result.start_index = match_start;
result.length = matched_length;
@@ -98,7 +98,7 @@ void PDFResource::SearchString(const unsigned short* input_string,
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)));
« no previous file with comments | « ppapi/proxy/flash_clipboard_resource.cc ('k') | ppapi/proxy/platform_verification_private_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698