From cbebf58c1dbf06419be27d4a9014f160e989506e Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 22 Jun 2026 11:01:41 +0200 Subject: [PATCH] Drop the `cast_size_t_to_ulong()` helper Now that all of the call sites of this helper (which I used as a kind of "NEEDSWORK" marker) are eliminated, we can drop that helper altogether. Signed-off-by: Johannes Schindelin --- git-compat-util.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/git-compat-util.h b/git-compat-util.h index 8809776407..01ea8fe0d5 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -666,15 +666,6 @@ static inline size_t st_left_shift(size_t a, unsigned shift) return a << shift; } -static inline unsigned long cast_size_t_to_ulong(size_t a) -{ - if (a != (unsigned long)a) - die("object too large to read on this platform: %" - PRIuMAX" is cut off to %lu", - (uintmax_t)a, (unsigned long)a); - return (unsigned long)a; -} - static inline uint32_t cast_size_t_to_uint32_t(size_t a) { if (a != (uint32_t)a)