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

Unified Diff: runtime/bin/socket.cc

Issue 139043003: - Address warnings about 64-bit to 32-bit conversions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « runtime/bin/filter.cc ('k') | runtime/include/dart_native_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/socket.cc
===================================================================
--- runtime/bin/socket.cc (revision 31864)
+++ runtime/bin/socket.cc (working copy)
@@ -53,7 +53,7 @@
SocketAddress::GetSockAddr(Dart_GetNativeArgument(args, 1), &addr);
Dart_Handle port_arg = Dart_GetNativeArgument(args, 2);
int64_t port = DartUtils::GetInt64ValueCheckRange(port_arg, 0, 65535);
- intptr_t socket = Socket::CreateConnect(addr, port);
+ intptr_t socket = Socket::CreateConnect(addr, static_cast<intptr_t>(port));
OSError error;
if (socket >= 0) {
Socket::SetSocketIdNativeField(Dart_GetNativeArgument(args, 0), socket);
@@ -70,7 +70,9 @@
Dart_Handle port_arg = Dart_GetNativeArgument(args, 2);
int64_t port = DartUtils::GetInt64ValueCheckRange(port_arg, 0, 65535);
bool reuse_addr = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3));
- intptr_t socket = Socket::CreateBindDatagram(&addr, port, reuse_addr);
+ intptr_t socket = Socket::CreateBindDatagram(&addr,
+ static_cast<intptr_t>(port),
+ reuse_addr);
if (socket >= 0) {
Socket::SetSocketIdNativeField(Dart_GetNativeArgument(args, 0), socket);
Dart_SetReturnValue(args, Dart_True());
« no previous file with comments | « runtime/bin/filter.cc ('k') | runtime/include/dart_native_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698