From 49f8f323d569d7a389bbcf226531028bedca82fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Fri, 11 May 2018 21:28:14 +0200 Subject: [PATCH] =?UTF-8?q?Prospective=20build=20fix=20for=20attempted=20c?= =?UTF-8?q?all=20of=20=E2=80=98min(size=5Ft,=20uintmax=5Ft)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sparsebundlefs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sparsebundlefs.cpp b/sparsebundlefs.cpp index 1fa184f..98957fd 100644 --- a/sparsebundlefs.cpp +++ b/sparsebundlefs.cpp @@ -153,7 +153,7 @@ static int sparsebundle_iterate_bands(const char *path, size_t length, off_t off uintmax_t band_number = (offset + bytes_read) / sparsebundle->band_size; uintmax_t band_offset = (offset + bytes_read) % sparsebundle->band_size; - size_t to_read = min(length - bytes_read, sparsebundle->band_size - band_offset); + size_t to_read = min(uintmax_t(length - bytes_read), sparsebundle->band_size - band_offset); char *band_path; if (asprintf(&band_path, "%s/bands/%jx", sparsebundle->path, band_number) == -1) {