From 69675a1bbdebcced6634109669c688a951d41cf6 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 31 Aug 2023 09:41:41 +0200 Subject: [PATCH] Explicit cast of `-1` to `zsize_t` --- src/writer/contentProvider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/writer/contentProvider.cpp b/src/writer/contentProvider.cpp index 0896d90c9..48f0c2d9a 100644 --- a/src/writer/contentProvider.cpp +++ b/src/writer/contentProvider.cpp @@ -63,7 +63,7 @@ namespace zim return Blob(nullptr, 0); } - if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)).v == -1UL) { + if(fd->readAt(buffer.get(), zim::zsize_t(sizeToRead), zim::offset_t(offset)) == zim::zsize_t(-1)) { throw std::runtime_error("Error reading file " + filepath); } offset += sizeToRead;