[PATCH v2 08/12] archive-zip: widen `zlib_deflate_raw()`'s maxsize local to `size_t`
- From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Aug 5, 2026, 16:14 UTC
- Message-ID
- <9f379ee7aa715356ea3377d3e2096df219ea8c76.1785946479.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.2175.v2.git.1785946479.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Prep for the upcoming `git_deflate_bound()` widening to `size_t`: the local that catches its return needs to be `size_t` too, otherwise the widening would introduce a silent Windows narrowing here. No semantic effect with the current unsigned-long-returning `git_deflate_bound()` (`size_t == unsigned long` on this caller's platforms today).
Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> --- archive-zip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/archive-zip.c b/archive-zip.c index 97ea8d60d6..a487d4c041 100644 --- a/archive-zip.c +++ b/archive-zip.c @@ -206,7 +206,7 @@ static void *zlib_deflate_raw(void *data, unsigned long size, unsigned long *compressed_size) { git_zstream stream; - unsigned long maxsize; + size_t maxsize; void *buffer; int result;
-- gitgitgadget