commit 9316cc27bdc5db7db6927879f3c47b63f1c8ded2 from: Stefan Sperling date: Thu Oct 20 13:52:30 2022 UTC switch integers used for counting objects while indexing pack files to unsigned commit - 09ee8ded96c5163fc8b06a8bdba606db19b2974a commit + 9316cc27bdc5db7db6927879f3c47b63f1c8ded2 blob - 5a2aab6936ab69339d4222d09c60d58f421d067c blob + 0aaa7ce0d80e279d0cc620502c79b4671a3ae724 --- lib/got_lib_pack_index.h +++ lib/got_lib_pack_index.h @@ -15,7 +15,8 @@ */ typedef const struct got_error *(got_pack_index_progress_cb)(void *, - int nobj_total, int nobj_indexed, int nobj_loose, int nobj_resolved); + uint32_t nobj_total, uint32_t nobj_indexed, uint32_t nobj_loose, + uint32_t nobj_resolved); const struct got_error * got_pack_index(struct got_pack *pack, int idxfd, blob - d0b713ea9964a6d53335b7f910b6143346ea77e3 blob + e85d5490e5500a2547fce3244c397bc70e0d1dfe --- lib/pack_index.c +++ lib/pack_index.c @@ -546,7 +546,7 @@ indexed_obj_cmp(const void *pa, const void *pb) } static void -make_packidx(struct got_packidx *packidx, int nobj, +make_packidx(struct got_packidx *packidx, uint32_t nobj, struct got_indexed_object *objects) { struct got_indexed_object *obj; @@ -568,7 +568,7 @@ make_packidx(struct got_packidx *packidx, int nobj, } static void -update_packidx(struct got_packidx *packidx, int nobj, +update_packidx(struct got_packidx *packidx, uint32_t nobj, struct got_indexed_object *obj) { int idx; @@ -591,8 +591,8 @@ update_packidx(struct got_packidx *packidx, int nobj, } static const struct got_error * -report_progress(int nobj_total, int nobj_indexed, int nobj_loose, - int nobj_resolved, struct got_ratelimit *rl, +report_progress(uint32_t nobj_total, uint32_t nobj_indexed, uint32_t nobj_loose, + uint32_t nobj_resolved, struct got_ratelimit *rl, got_pack_index_progress_cb progress_cb, void *progress_arg) { const struct got_error *err; @@ -619,7 +619,7 @@ got_pack_index(struct got_pack *pack, int idxfd, FILE struct got_packidx packidx; char buf[8]; char pack_sha1[SHA1_DIGEST_LENGTH]; - int nobj, nvalid, nloose, nresolved = 0, i; + uint32_t nobj, nvalid, nloose, nresolved = 0, i; struct got_indexed_object *objects = NULL, *obj; SHA1_CTX ctx; uint8_t packidx_hash[SHA1_DIGEST_LENGTH]; blob - 5e1cdd91604197f387a69d438c81d9d7787bb0d2 blob + 8a38382357c6aeb5b642965a26a50d9a6621d34e --- libexec/got-index-pack/got-index-pack.c +++ libexec/got-index-pack/got-index-pack.c @@ -46,8 +46,8 @@ #endif static const struct got_error * -send_index_pack_progress(void *arg, int nobj_total, int nobj_indexed, - int nobj_loose, int nobj_resolved) +send_index_pack_progress(void *arg, uint32_t nobj_total, uint32_t nobj_indexed, + uint32_t nobj_loose, uint32_t nobj_resolved) { struct imsgbuf *ibuf = arg; struct got_imsg_index_pack_progress iprogress;