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

Unified Diff: ppapi/proxy/file_ref_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/device_enumeration_resource_helper.cc ('k') | ppapi/proxy/flash_clipboard_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/file_ref_resource.cc
diff --git a/ppapi/proxy/file_ref_resource.cc b/ppapi/proxy/file_ref_resource.cc
index 098ef5f336abfccdee12abc903e012e789942b89..ee56969cd82068b83e0b17d18ac73f3d7ae29b96 100644
--- a/ppapi/proxy/file_ref_resource.cc
+++ b/ppapi/proxy/file_ref_resource.cc
@@ -4,6 +4,7 @@
#include "ppapi/proxy/file_ref_resource.h"
+#include "base/numerics/safe_conversions.h"
#include "ppapi/c/pp_directory_entry.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
@@ -29,7 +30,7 @@ FileRefResource::FileRefResource(
if (uses_internal_paths()) {
// If path ends with a slash, then normalize it away unless path is
// the root path.
- int path_size = create_info_.internal_path.size();
+ int path_size = base::checked_cast<int>(create_info_.internal_path.size());
if (path_size > 1 && create_info_.internal_path.at(path_size - 1) == '/')
create_info_.internal_path.erase(path_size - 1, 1);
« no previous file with comments | « ppapi/proxy/device_enumeration_resource_helper.cc ('k') | ppapi/proxy/flash_clipboard_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698