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 73c5c853303bb76b9af502360c58be403da16da1..ed23e9f0f128f6261964efcfd7dcadddf10f163d 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);