diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Hold object sizes in size_t as git 2.55 does
Git 2.55 moved object sizes from unsigned long to size_t. The two are the same type on 64-bit hosts, but not on a 32-bit one, where GCC 14 rejects the mismatched pointers, so cgit stopped compiling there.
Diffstat (limited to '')
-rw-r--r--source/ui-shared.c4
1 file changed, 2 insertions, 2 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c
index 94a749e..f762fd7 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1658,9 +1658,9 @@ void cgit_vprint_error_page(int code, const char *msg, const char *fmt, va_list
cgit_print_layout_end();
}
-void cgit_print_blob_too_large(unsigned long size)
+void cgit_print_blob_too_large(size_t size)
{
- cgit_print_error_page(413, "Content Too Large", "Blob size (%lu KB) exceeds the limit (%d KB)",
+ cgit_print_error_page(413, "Content Too Large", "Blob size (%zu KB) exceeds the limit (%d KB)",
size / 1024, ctx.cfg.max_blob_size);
}