From c7993af64baec271a238646bc20aaa846866c4a9 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Fri, 25 May 2012 13:55:46 -0700 Subject: [PATCH] adb: Fix compiler warning system/core/adb/adb.c: In function 'connect_device': system/core/adb/adb.c:1001: warning: comparison between signed and unsigned integer expressions Change-Id: I206f85395e1d7ad8d6ef130a26c95dcf0f498696 Signed-off-by: Scott Anderson --- adb/adb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adb/adb.c b/adb/adb.c index 92ef97c68..8c82a0c88 100644 --- a/adb/adb.c +++ b/adb/adb.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -998,7 +999,7 @@ void connect_device(char* host, char* buffer, int buffer_size) strncpy(hostbuf, host, sizeof(hostbuf) - 1); if (portstr) { - if (portstr - host >= sizeof(hostbuf)) { + if (portstr - host >= (ptrdiff_t)sizeof(hostbuf)) { snprintf(buffer, buffer_size, "bad host name %s", host); return; }