chiark / gitweb /
test-pty: silence a warning
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Thu, 17 Jul 2014 18:23:53 +0000 (20:23 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Thu, 17 Jul 2014 18:23:53 +0000 (20:23 +0200)
src/test/test-pty.c

index 73c5c85..ed23e9f 100644 (file)
@@ -37,11 +37,11 @@ static size_t rcvsiz = 0;
 static sd_event *event;
 
 static void run_child(Pty *pty) {
-        int r, l;
+        ssize_t r, l;
         char buf[512];
 
         r = read(0, buf, sizeof(buf));
-        assert_se(r == strlen(sndmsg));
+        assert_se((size_t)r == strlen(sndmsg));
         assert_se(!strncmp(buf, sndmsg, r));
 
         l = write(1, buf, r);