@@ -960,7 +960,8 @@ static int store_object(
960960 struct object_entry * e ;
961961 unsigned char hdr [96 ];
962962 struct object_id oid ;
963- unsigned long hdrlen , deltalen ;
963+ unsigned long hdrlen ;
964+ size_t deltalen ;
964965 struct git_hash_ctx c ;
965966 git_zstream s ;
966967
@@ -1221,7 +1222,7 @@ static void stream_blob(uintmax_t len, struct object_id *oidout, uintmax_t mark)
12211222 */
12221223static void * gfi_unpack_entry (
12231224 struct object_entry * oe ,
1224- unsigned long * sizep )
1225+ size_t * sizep )
12251226{
12261227 enum object_type type ;
12271228 struct packed_git * p = all_packs [oe -> pack_id ];
@@ -1253,7 +1254,7 @@ static void load_tree(struct tree_entry *root)
12531254 struct object_id * oid = & root -> versions [1 ].oid ;
12541255 struct object_entry * myoe ;
12551256 struct tree_content * t ;
1256- unsigned long size ;
1257+ size_t size ;
12571258 char * buf ;
12581259 const char * c ;
12591260
@@ -2540,7 +2541,7 @@ static void note_change_n(const char *p, struct branch *b, unsigned char *old_fa
25402541 die (_ ("mark :%" PRIuMAX " not a commit" ), commit_mark );
25412542 oidcpy (& commit_oid , & commit_oe -> idx .oid );
25422543 } else if (!repo_get_oid (the_repository , p , & commit_oid )) {
2543- unsigned long size ;
2544+ size_t size ;
25442545 char * buf = odb_read_object_peeled (the_repository -> objects ,
25452546 & commit_oid , OBJ_COMMIT , & size ,
25462547 & commit_oid );
@@ -2606,7 +2607,7 @@ static void parse_from_existing(struct branch *b)
26062607 oidclr (& b -> branch_tree .versions [0 ].oid , the_repository -> hash_algo );
26072608 oidclr (& b -> branch_tree .versions [1 ].oid , the_repository -> hash_algo );
26082609 } else {
2609- unsigned long size ;
2610+ size_t size ;
26102611 char * buf ;
26112612
26122613 buf = odb_read_object_peeled (the_repository -> objects , & b -> oid ,
@@ -2639,7 +2640,7 @@ static int parse_objectish(struct branch *b, const char *objectish)
26392640 if (!oideq (& b -> oid , & oe -> idx .oid )) {
26402641 oidcpy (& b -> oid , & oe -> idx .oid );
26412642 if (oe -> pack_id != MAX_PACK_ID ) {
2642- unsigned long size ;
2643+ size_t size ;
26432644 char * buf = gfi_unpack_entry (oe , & size );
26442645 parse_from_commit (b , buf , size );
26452646 free (buf );
@@ -2702,7 +2703,7 @@ static struct hash_list *parse_merge(unsigned int *count)
27022703 die (_ ("mark :%" PRIuMAX " not a commit" ), idnum );
27032704 oidcpy (& n -> oid , & oe -> idx .oid );
27042705 } else if (!repo_get_oid (the_repository , from , & n -> oid )) {
2705- unsigned long size ;
2706+ size_t size ;
27062707 char * buf = odb_read_object_peeled (the_repository -> objects ,
27072708 & n -> oid , OBJ_COMMIT ,
27082709 & size , & n -> oid );
@@ -3201,7 +3202,7 @@ static void cat_blob_write(const char *buf, unsigned long size)
32013202static void cat_blob (struct object_entry * oe , struct object_id * oid )
32023203{
32033204 struct strbuf line = STRBUF_INIT ;
3204- unsigned long size ;
3205+ size_t size ;
32053206 enum object_type type = 0 ;
32063207 char * buf ;
32073208
@@ -3285,7 +3286,7 @@ static void parse_cat_blob(const char *p)
32853286static struct object_entry * dereference (struct object_entry * oe ,
32863287 struct object_id * oid )
32873288{
3288- unsigned long size ;
3289+ size_t size ;
32893290 char * buf = NULL ;
32903291 const unsigned hexsz = the_hash_algo -> hexsz ;
32913292
0 commit comments