From d942a73b6fca6388ff8085e8f58790bf15b962a1 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 12 Oct 2018 15:52:02 +0200 Subject: Silence compiler warning about signed vs. unsigned compare --- src/libusbmuxd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 712c362..379a948 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -535,11 +535,11 @@ static void get_prog_name() size_t r = fread(tmpbuf, 1, 512, f); if (r > 0) { char *p = tmpbuf; - while ((p-tmpbuf < r) && (*p != '(') && (*p != '\0')) p++; + while ((p-tmpbuf < (ssize_t)r) && (*p != '(') && (*p != '\0')) p++; if (*p == '(') { p++; char *pname = p; - while ((p-tmpbuf < r) && (*p != ')') && (*p != '\0')) p++; + while ((p-tmpbuf < (ssize_t)r) && (*p != ')') && (*p != '\0')) p++; if (*p == ')') { *p = '\0'; prog_name = strdup(pname); -- cgit v1.1-32-gdbae