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

Unified Diff: webkit/plugins/ppapi/message_channel.cc

Issue 14246019: Fix a warning in 64bit c++11 mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: p(arano)iman Created 7 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/message_channel.cc
diff --git a/webkit/plugins/ppapi/message_channel.cc b/webkit/plugins/ppapi/message_channel.cc
index 4a0165fd49ae20e2c9836deeb42326602530b029..b4d207e339b3d7849bec1d35bc0ed6b0de0ccb98 100644
--- a/webkit/plugins/ppapi/message_channel.cc
+++ b/webkit/plugins/ppapi/message_channel.cc
@@ -284,7 +284,7 @@ bool MessageChannelEnumerate(NPObject *np_obj, NPIdentifier **value,
if (success) {
// Add postMessage to the list and return it.
if (std::numeric_limits<size_t>::max() / sizeof(NPIdentifier) <=
- (*count + 1))
+ static_cast<size_t>(*count) + 1) // Else, "always false" x64 warning.
return false;
NPIdentifier* new_array = static_cast<NPIdentifier*>(
std::malloc(sizeof(NPIdentifier) * (*count + 1)));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698