]> git.ipfire.org Git - thirdparty/git.git/commitdiff
remote: fix sign-compare warnings in push_cas_option
authorUsman Akinyemi <usmanakinyemi202@gmail.com>
Sun, 3 May 2026 15:34:00 +0000 (21:04 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 May 2026 01:11:17 +0000 (10:11 +0900)
Replace `int` with `size_t` for `nr` and `alloc` in
`struct push_cas_option` to avoid -Werror=sign-compare
warnings when comparing against size-based values.

Suggested-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Usman Akinyemi <usmanakinyemi202@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote.h

index fc052945ee451d35510fe90404c6a7dcd0ab5b0e..741d14a9fcefcd625528e42b4fda301d6685c7c8 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -418,8 +418,8 @@ struct push_cas_option {
                unsigned use_tracking:1;
                char *refname;
        } *entry;
-       int nr;
-       int alloc;
+       size_t nr;
+       size_t alloc;
 };
 
 int parseopt_push_cas_option(const struct option *, const char *arg, int unset);