From eeed45fa24f3bc3046f352bf9788061715b44dcf Mon Sep 17 00:00:00 2001 From: Greg Hackmann Date: Wed, 21 May 2014 10:39:44 -0700 Subject: [PATCH] toolbox: fix build Change-Id: I4d37ae4ad19620f77e37b739fb1248b712b3f986 Signed-off-by: Greg Hackmann --- toolbox/insmod.c | 2 +- toolbox/watchprops.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/toolbox/insmod.c b/toolbox/insmod.c index fb1448ba5..d252433bf 100644 --- a/toolbox/insmod.c +++ b/toolbox/insmod.c @@ -73,7 +73,7 @@ int insmod_main(int argc, char **argv) char *ptr = opts; for (i = 2; (i < argc) && (ptr < end); i++) { - len = MIN(strlen(argv[i]), end - ptr); + len = MIN(strlen(argv[i]), (size_t)(end - ptr)); memcpy(ptr, argv[i], len); ptr += len; *ptr++ = ' '; diff --git a/toolbox/watchprops.c b/toolbox/watchprops.c index 9921dbcdb..06cdebec3 100644 --- a/toolbox/watchprops.c +++ b/toolbox/watchprops.c @@ -23,9 +23,9 @@ static bool str_equals(void *keyA, void *keyB) static void announce(char *name, char *value) { - char *x; + unsigned char *x; - for(x = value; *x; x++) { + for(x = (unsigned char *)value; *x; x++) { if((*x < 32) || (*x > 127)) *x = '.'; }