From 57e1395d476d0bfa3490c033c03642cf1e90c467 Mon Sep 17 00:00:00 2001 From: Daniel Murphy Date: Mon, 27 Jan 2014 01:22:39 +1100 Subject: [PATCH] Explicitly cast off_t to size_t --- src/root/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/root/file.c b/src/root/file.c index c0131d3de5cf..9cd5d7581387 100644 --- a/src/root/file.c +++ b/src/root/file.c @@ -86,7 +86,7 @@ int File::read() if (len) return 0; // already read the file #if POSIX - off_t size; + size_t size; ssize_t numread; int fd; struct stat buf; @@ -112,7 +112,7 @@ int File::read() printf("\tfstat error, errno = %d\n",errno); goto err2; } - size = buf.st_size; + size = (size_t)buf.st_size; buffer = (unsigned char *) ::malloc(size + 2); if (!buffer) {