diff options
author | Elliott Hughes <enh@google.com> | 2014-01-16 14:42:35 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-01-16 14:42:35 -0800 |
commit | b70375abc2c4da6f868da4eef3d3f059acdf9774 (patch) | |
tree | 52e04bc7cf0e003783006d488c7c6d276d500f45 /adb | |
parent | 24239a99ffde4a264be3121bff8b1ee70b78f63c (diff) | |
parent | ec9e5891ac97c50cfb8d3d1c9c2d478637eff62b (diff) | |
download | system_core-b70375abc2c4da6f868da4eef3d3f059acdf9774.zip system_core-b70375abc2c4da6f868da4eef3d3f059acdf9774.tar.gz system_core-b70375abc2c4da6f868da4eef3d3f059acdf9774.tar.bz2 |
resolved conflicts for merge of ec9e5891 to master
Change-Id: I704e3159d529e436e060cb66c1739ef8e7b612d4
Diffstat (limited to 'adb')
-rw-r--r-- | adb/services.c | 8 | ||||
-rw-r--r-- | adb/sockets.c | 2 | ||||
-rw-r--r-- | adb/transport.c | 6 | ||||
-rw-r--r-- | adb/transport_local.c | 6 | ||||
-rw-r--r-- | adb/usb_linux.c | 2 | ||||
-rw-r--r-- | adb/usb_linux_client.c | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/adb/services.c b/adb/services.c index be0cc72..dcaf276 100644 --- a/adb/services.c +++ b/adb/services.c @@ -86,7 +86,7 @@ void restart_tcp_service(int fd, void *cookie) { char buf[100]; char value[PROPERTY_VALUE_MAX]; - int port = (int)cookie; + int port = (int) (uintptr_t) cookie; if (port <= 0) { snprintf(buf, sizeof(buf), "invalid port\n"); @@ -256,7 +256,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 #if !ADB_HOST static void subproc_waiter_service(int fd, void *cookie) { - pid_t pid = (pid_t)cookie; + pid_t pid = (pid_t) (uintptr_t) cookie; D("entered. fd=%d of pid=%d\n", fd, pid); for (;;) { @@ -301,7 +301,7 @@ static int create_subproc_thread(const char *name) sti = malloc(sizeof(stinfo)); if(sti == 0) fatal("cannot allocate stinfo"); sti->func = subproc_waiter_service; - sti->cookie = (void*)pid; + sti->cookie = (void*) (uintptr_t) pid; sti->fd = ret_fd; if(adb_thread_create( &t, service_bootstrap_func, sti)){ @@ -382,7 +382,7 @@ int service_to_fd(const char *name) if (sscanf(name + 6, "%d", &port) == 0) { port = 0; } - ret = create_service_thread(restart_tcp_service, (void *)port); + ret = create_service_thread(restart_tcp_service, (void *) (uintptr_t) port); } else if(!strncmp(name, "usb:", 4)) { ret = create_service_thread(restart_usb_service, NULL); #endif diff --git a/adb/sockets.c b/adb/sockets.c index 7f54ad9..de14a22 100644 --- a/adb/sockets.c +++ b/adb/sockets.c @@ -342,7 +342,7 @@ static void local_socket_event_func(int fd, unsigned ev, void *_s) while(avail > 0) { r = adb_read(fd, x, avail); - D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%d\n", s->id, s->fd, r, r<0?errno:0, avail); + D("LS(%d): post adb_read(fd=%d,...) r=%d (errno=%d) avail=%zu\n", s->id, s->fd, r, r<0?errno:0, avail); if(r > 0) { avail -= r; x += r; diff --git a/adb/transport.c b/adb/transport.c index 224fe55..6002530 100644 --- a/adb/transport.c +++ b/adb/transport.c @@ -1142,9 +1142,9 @@ int readx(int fd, void *ptr, size_t len) char *p = ptr; int r; #if ADB_TRACE - int len0 = len; + size_t len0 = len; #endif - D("readx: fd=%d wanted=%d\n", fd, (int)len); + D("readx: fd=%d wanted=%zu\n", fd, len); while(len > 0) { r = adb_read(fd, p, len); if(r > 0) { @@ -1163,7 +1163,7 @@ int readx(int fd, void *ptr, size_t len) } #if ADB_TRACE - D("readx: fd=%d wanted=%d got=%d\n", fd, len0, len0 - len); + D("readx: fd=%d wanted=%zu got=%zu\n", fd, len0, len0 - len); dump_hex( ptr, len0 ); #endif return 0; diff --git a/adb/transport_local.c b/adb/transport_local.c index 1cfa24d..d2dbca6 100644 --- a/adb/transport_local.c +++ b/adb/transport_local.c @@ -159,7 +159,7 @@ static void *server_socket_thread(void * arg) int serverfd, fd; struct sockaddr addr; socklen_t alen; - int port = (int)arg; + int port = (int) (uintptr_t) arg; D("transport: server_socket_thread() starting\n"); serverfd = -1; @@ -241,7 +241,7 @@ static const char _start_req[] = "start"; /* 'ok' reply from the adb QEMUD service. */ static const char _ok_resp[] = "ok"; - const int port = (int)arg; + const int port = (int) (uintptr_t) arg; int res, fd; char tmp[256]; char con_name[32]; @@ -326,7 +326,7 @@ void local_init(int port) D("transport: local %s init\n", HOST ? "client" : "server"); - if(adb_thread_create(&thr, func, (void *)port)) { + if(adb_thread_create(&thr, func, (void *) (uintptr_t) port)) { fatal_errno("cannot create local socket %s thread", HOST ? "client" : "server"); } diff --git a/adb/usb_linux.c b/adb/usb_linux.c index 7bf2057..8ff753e 100644 --- a/adb/usb_linux.c +++ b/adb/usb_linux.c @@ -179,7 +179,7 @@ static void find_usb_device(const char *base, // should have device and configuration descriptors, and atleast two endpoints if (desclength < USB_DT_DEVICE_SIZE + USB_DT_CONFIG_SIZE) { - D("desclength %d is too small\n", desclength); + D("desclength %zu is too small\n", desclength); adb_close(fd); continue; } diff --git a/adb/usb_linux_client.c b/adb/usb_linux_client.c index fb1dad0..69d8062 100644 --- a/adb/usb_linux_client.c +++ b/adb/usb_linux_client.c @@ -384,7 +384,7 @@ static int bulk_read(int bulk_out, char *buf, size_t length) ret = adb_read(bulk_out, buf + count, length - count); if (ret < 0) { if (errno != EINTR) { - D("[ bulk_read failed fd=%d length=%d count=%d ]\n", + D("[ bulk_read failed fd=%d length=%zu count=%zu ]\n", bulk_out, length, count); return ret; } |