Commit 963ac08a0c965b18b47c0c444eeab1580183b3c9

Christian Weisgerber 2021-09-25T20:21:10

match printf specifiers and (cast) types for portability ok stsp

diff --git a/gotadmin/gotadmin.c b/gotadmin/gotadmin.c
index a6398cc..243023a 100644
--- a/gotadmin/gotadmin.c
+++ b/gotadmin/gotadmin.c
@@ -780,8 +780,8 @@ list_pack_cb(void *arg, struct got_object_id *id, int type, off_t offset,
 		break;
 	case GOT_OBJ_TYPE_OFFSET_DELTA:
 		type_str = "offset-delta";
-		if (asprintf(&delta_str, " base-offset %llu",
-		    base_offset) == -1) {
+		if (asprintf(&delta_str, " base-offset %lld",
+		    (long long)base_offset) == -1) {
 			err = got_error_from_errno("asprintf");
 			goto done;
 		}
@@ -812,11 +812,12 @@ list_pack_cb(void *arg, struct got_object_id *id, int type, off_t offset,
 		s = scaled;
 		while (isspace((unsigned char)*s))
 			s++;
-		printf("%s %s at %llu size %s%s\n", id_str, type_str, offset,
-		    s, delta_str ? delta_str : "");
+		printf("%s %s at %lld size %s%s\n", id_str, type_str,
+		    (long long)offset, s, delta_str ? delta_str : "");
 	} else {
-		printf("%s %s at %llu size %llu%s\n", id_str, type_str, offset,
-		    size, delta_str ? delta_str : "");
+		printf("%s %s at %lld size %lld%s\n", id_str, type_str,
+		    (long long)offset, (long long)size,
+		    delta_str ? delta_str : "");
 	}
 done:
 	free(id_str);