util/os_file: suppress sign comparison warning
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 16 May 2019 14:37:28 +0000 (15:37 +0100)
committerEric Engestrom <eric@engestrom.ch>
Sun, 9 Jun 2019 13:14:13 +0000 (13:14 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/os_file.c

index 6e78a231d67cbe87ec072c8c304a15b3739d8f4c..a700f3aada3088b6f1164fbc78a7e6f9dc886ac2 100644 (file)
@@ -72,7 +72,7 @@ os_read_file(const char *filename)
 
    ssize_t actually_read;
    size_t offset = 0, remaining = len - 1;
-   while ((actually_read = readN(fd, buf + offset, remaining)) == remaining) {
+   while ((actually_read = readN(fd, buf + offset, remaining)) == (ssize_t)remaining) {
       char *newbuf = realloc(buf, 2 * len);
       if (!newbuf) {
          free(buf);