aboutsummaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-02-05 17:30:31 -0800
committerColin Cross <ccross@android.com>2014-02-05 17:34:45 -0800
commit92cdf9c37225c6f76b96c8f137896cd9e9015bbd (patch)
treedbf70c82b2e8d48e6d6515689b47cfe327f71b49 /minadbd
parentf353207298ed14d0e6943353dd9788421a7537b8 (diff)
downloadbootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.zip
bootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.tar.gz
bootable_recovery-92cdf9c37225c6f76b96c8f137896cd9e9015bbd.tar.bz2
recovery: fix building with pointer-to-int errors turned on
Use intptr_t/uintptr_t to cast between pointer and int to allow building with -Werror=pointer-to-int-cast and Werror=int-to-pointer-cast turned on. Cast to char* instead of unsigned int for pointer arithmetic. Change-Id: Ia862306fdcca53866b330e8cf726f3d62f2248a0
Diffstat (limited to 'minadbd')
-rw-r--r--minadbd/services.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/minadbd/services.c b/minadbd/services.c
index aef37f7..4698528 100644
--- a/minadbd/services.c
+++ b/minadbd/services.c
@@ -46,7 +46,7 @@ void *service_bootstrap_func(void *x)
static void sideload_service(int s, void *cookie)
{
unsigned char buf[4096];
- unsigned count = (unsigned) cookie;
+ unsigned count = (unsigned)(uintptr_t)cookie;
int fd;
fprintf(stderr, "sideload_service invoked\n");
@@ -149,7 +149,7 @@ int service_to_fd(const char *name)
int ret = -1;
if (!strncmp(name, "sideload:", 9)) {
- ret = create_service_thread(sideload_service, (void*) atoi(name + 9));
+ ret = create_service_thread(sideload_service, (void*)(uintptr_t)atoi(name + 9));
#if 0
} else if(!strncmp(name, "echo:", 5)){
ret = create_service_thread(echo_service, 0);