Commit Diff


commit - 33f9ea25c71c18df082c187e2ada3d3f288b912d
commit + e4a6dbc6cd4d9ac4f616b16388061ef0f8fec303
blob - d30a598fe4e93888af0b6bf95e0deb862e3ca037
blob + 71103e9ede2a7e55e38cf95e643104d11e8ac378
--- lib/deltify.c
+++ lib/deltify.c
@@ -522,8 +522,8 @@ stretchblk_file_mem(uint8_t *basedata, off_t base_offs
 
 	if (base_offset > basefile_size) {
 		return got_error_fmt(GOT_ERR_RANGE,
-		    "read beyond the size of delta base at offset %llu",
-		    base_offset);
+		    "read beyond the size of delta base at offset %lld",
+		    (long long)base_offset);
 	}
 
 	while (buf_equal && *blocklen < (1 << 24) - 1) {
@@ -558,8 +558,8 @@ stretchblk_mem_file(FILE *basefile, off_t base_offset0
 
 	if (fileoffset > filesize) {
 		return got_error_fmt(GOT_ERR_RANGE,
-		    "read beyond the size of deltify file at offset %llu",
-		    fileoffset);
+		    "read beyond the size of deltify file at offset %lld",
+		    (long long)fileoffset);
 	}
 
 	if (fseeko(basefile, base_offset0 + block->offset + *blocklen,
@@ -598,14 +598,14 @@ stretchblk_mem_mem(uint8_t *basedata, off_t base_offse
 
 	if (base_offset > basefile_size) {
 		return got_error_fmt(GOT_ERR_RANGE,
-		    "read beyond the size of delta base at offset %llu",
-		    base_offset);
+		    "read beyond the size of delta base at offset %lld",
+		    (long long)base_offset);
 	}
 
 	if (fileoffset > filesize) {
 		return got_error_fmt(GOT_ERR_RANGE,
-		    "read beyond the size of deltify file at offset %llu",
-		    fileoffset);
+		    "read beyond the size of deltify file at offset %lld",
+		    (long long)fileoffset);
 	}
 
 	p = data + fileoffset;
blob - 44ff153b0f81aba53b17181132ab84069f3c5507
blob + 37bc22a5cd985ace5fde99d2e50c1b8d3c9fc820
--- lib/pack.c
+++ lib/pack.c
@@ -1132,7 +1132,7 @@ resolve_ref_delta(struct got_delta_chain *deltas, stru
 		return got_error(GOT_ERR_NO_OBJ);
 
 	base_offset = got_packidx_get_object_offset(packidx, idx);
-	if (base_offset == (uint64_t)-1)
+	if (base_offset == -1)
 		return got_error(GOT_ERR_BAD_PACKIDX);
 
 	if (base_offset >= pack->filesize)
@@ -1235,7 +1235,7 @@ got_packfile_open_object(struct got_object **obj, stru
 	*obj = NULL;
 
 	offset = got_packidx_get_object_offset(packidx, idx);
-	if (offset == (uint64_t)-1)
+	if (offset == -1)
 		return got_error(GOT_ERR_BAD_PACKIDX);
 
 	err = got_pack_parse_object_type_and_size(&type, &size, &tslen,
@@ -1813,7 +1813,7 @@ got_packfile_extract_raw_delta(uint8_t **delta_buf, si
 	*result_size = 0;
 
 	offset = got_packidx_get_object_offset(packidx, idx);
-	if (offset == (uint64_t)-1)
+	if (offset == -1)
 		return got_error(GOT_ERR_BAD_PACKIDX);
 
 	if (offset >= pack->filesize)
@@ -1843,8 +1843,8 @@ got_packfile_extract_raw_delta(uint8_t **delta_buf, si
 		break;
 	default:
 		return got_error_fmt(GOT_ERR_OBJ_TYPE,
-		    "non-delta object type %d found at offset %llu",
-		    type, offset);
+		    "non-delta object type %d found at offset %lld",
+		    type, (long long)offset);
 	}
 
 	if (tslen + delta_hdrlen < delta_hdrlen ||