From 64c8cae5195ad4f65497845aa3493bec6c86b027 Mon Sep 17 00:00:00 2001 From: Dirk Farin Date: Tue, 10 Sep 2024 16:41:36 +0200 Subject: [PATCH] fix windows compilation, undefined 'cnt' (#1302) --- libheif/box.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libheif/box.cc b/libheif/box.cc index 256ee61421..94d398f78d 100644 --- a/libheif/box.cc +++ b/libheif/box.cc @@ -1654,6 +1654,8 @@ Error Box_iloc::append_data(heif_item_id item_ID, assert(false); # if 0 int cnt = _write(m_tmpfile_fd, data.data(), data.size()); +# else + int cnt = -1; # endif #endif if (cnt < 0) { @@ -1916,6 +1918,8 @@ Error Box_iloc::write_mdat_after_iloc(StreamWriter& writer) assert(false); # if 0 int cnt = _read(m_tmpfile_fd, data.data(), extent.length); +# else + int cnt = -1; # endif #endif if (cnt<0) {