static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2)
{
- unsigned long p1_off = 0, p2_off = 0, p1_step, p2_step;
+ size_t p1_off = 0, p2_off = 0, p1_step, p2_step;
const unsigned char *p1_base, *p2_base;
struct llist_item *p1_hint = NULL, *p2_hint = NULL;
const unsigned int hashsz = the_hash_algo->rawsz;
static size_t sizeof_union(struct packed_git *p1, struct packed_git *p2)
{
size_t ret = 0;
- unsigned long p1_off = 0, p2_off = 0, p1_step, p2_step;
+ size_t p1_off = 0, p2_off = 0, p1_step, p2_step;
const unsigned char *p1_base, *p2_base;
const unsigned int hashsz = the_hash_algo->rawsz;
static struct pack_list * add_pack(struct packed_git *p)
{
struct pack_list l;
- unsigned long off = 0, step;
+ size_t off = 0, step;
const unsigned char *base;
if (!p->pack_local && !(alt_odb || verbose))
* variable sized table containing 8-byte entries
* for offsets larger than 2^31.
*/
- unsigned long min_size = 8 + 4*256 + (size_t)nr*(hashsz + 4 + 4) + hashsz + hashsz;
- unsigned long max_size = min_size;
+ size_t min_size = 8 + 4*256 + (size_t)nr*(hashsz + 4 + 4) + hashsz + hashsz;
+ size_t max_size = min_size;
if (nr)
max_size += ((size_t)nr - 1)*8;
if (idx_size < min_size || idx_size > max_size)