Commit Diff


commit - 6d5a9006ab2a400b488b9e93ec9647fb9b2a0930
commit + 6059809a13b5d528052e38f84661039e6565f458
blob - a25e4752c753ed41ccef89d82be94cb91863bc50
blob + 5f87f8a6758feb7e94e8c6665cab42a06ff59f62
--- got/got.c
+++ got/got.c
@@ -173,7 +173,7 @@ static struct got_cmd got_commands[] = {
 static void
 list_commands(FILE *fp)
 {
-	int i;
+	size_t i;
 
 	fprintf(fp, "commands:");
 	for (i = 0; i < nitems(got_commands); i++) {
@@ -193,7 +193,7 @@ int
 main(int argc, char *argv[])
 {
 	struct got_cmd *cmd;
-	unsigned int i;
+	size_t i;
 	int ch;
 	int hflag = 0, Vflag = 0;
 	static struct option longopts[] = {
@@ -7853,7 +7853,8 @@ write_cmd_list(FILE *f, const char *branch_name,
     struct got_object_id_queue *commits)
 {
 	const struct got_error *err = NULL;
-	int n, i;
+	size_t i;
+	int n;
 	char *id_str;
 	struct got_object_qid *qid;
 
@@ -8047,9 +8048,9 @@ histedit_parse_list(struct got_histedit_list *histedit
 {
 	const struct got_error *err = NULL;
 	char *line = NULL, *p, *end;
-	size_t size;
+	size_t i, size;
 	ssize_t len;
-	int lineno = 0, i;
+	int lineno = 0;
 	const struct got_histedit_cmd *cmd;
 	struct got_object_id *commit_id = NULL;
 	struct got_histedit_list_entry *hle = NULL;
blob - 90f2ff6373e29f9a86a336d1cd4d83b0082dd17f
blob + 9d3276731396175a544ea337396a6dad1abbe92e
--- libexec/got-fetch-pack/got-fetch-pack.c
+++ libexec/got-fetch-pack/got-fetch-pack.c
@@ -437,7 +437,7 @@ match_capabilities(char **my_capabilities, struct got_
 {
 	const struct got_error *err = NULL;
 	char *capa, *equalsign;
-	int i;
+	size_t i;
 
 	*my_capabilities = NULL;
 	do {
@@ -512,7 +512,7 @@ send_fetch_done(struct imsgbuf *ibuf, uint8_t *pack_sh
 static const struct got_error *
 fetch_progress(struct imsgbuf *ibuf, const char *buf, size_t len)
 {
-	int i;
+	size_t i;
 
 	if (len == 0)
 		return NULL;
@@ -540,7 +540,7 @@ static const struct got_error *
 fetch_error(const char *buf, size_t len)
 {
 	static char msg[1024];
-	int i;
+	size_t i;
 
 	for (i = 0; i < len && i < sizeof(msg) - 1; i++) {
 		if (!isprint(buf[i]))
blob - 5288649cc83bfaff88b857271cffd172e4221974
blob + 9b4ff2686ecb94be84e4c532e6734d682fb0383f
--- libexec/got-index-pack/got-index-pack.c
+++ libexec/got-index-pack/got-index-pack.c
@@ -974,7 +974,8 @@ main(int argc, char **argv)
 	const struct got_error *err = NULL, *close_err;
 	struct imsgbuf ibuf;
 	struct imsg imsg;
-	int idxfd = -1, tmpfd = -1, i;
+	size_t i;
+	int idxfd = -1, tmpfd = -1;
 	FILE *tmpfiles[3];
 	struct got_pack pack;
 	uint8_t pack_hash[SHA1_DIGEST_LENGTH];
blob - 7d362ee8758a771028e2f44e0ed1dcce7785589b
blob + 5a34b467d53cdd00972ddb50999b123d4ff69ac9
--- regress/delta/delta_test.c
+++ regress/delta/delta_test.c
@@ -59,7 +59,7 @@ static int
 delta_apply(void)
 {
 	const struct got_error *err = NULL;
-	int i;
+	size_t i;
 	FILE *result_file;
 
 	result_file = got_opentemp();
blob - f8fea68e3c733312ed6d4c1e5bd83b5b39082986
blob + 9b4589cd0ded9d79fab4b5af03f5139fe8961b62
--- regress/fetch/fetch_test.c
+++ regress/fetch/fetch_test.c
@@ -127,7 +127,7 @@ fetch_parse_uri(void)
 		    "ssh", "127.0.0.1", NULL, "22/git/myrepo", "myrepo",
 		    GOT_ERR_OK },
 	};
-	int i;
+	size_t i;
 
 	for (i = 0; i < nitems(test_data); i++) {
 		const char *uri = test_data[i].uri;
blob - 9e6ab487ea9ee978b7be952c359a3a884ea73b98
blob + 792c8cdc3d09be7a750bb57780cb89ea60c1e627
--- regress/path/path_test.c
+++ regress/path/path_test.c
@@ -79,7 +79,7 @@ path_cmp(void)
 		{ "/bar.sub.sub2", "/bar", 1 },
 		{ "/bar/sub/sub2", "/bar.c", -1 },
 	};
-	int i;
+	size_t i;
 
 	for (i = 0; i < nitems(test_data); i++) {
 		const char *path1 = test_data[i].path1;
@@ -139,7 +139,7 @@ path_list(void)
 	const struct got_error *err = NULL;
 	struct got_pathlist_head paths;
 	struct got_pathlist_entry *pe;
-	int i;
+	size_t i;
 
 	TAILQ_INIT(&paths);
 	for (i = 0; i < nitems(path_list_input); i++) {
@@ -175,7 +175,7 @@ path_list_reverse_input(void)
 	const struct got_error *err = NULL;
 	struct got_pathlist_head paths;
 	struct got_pathlist_entry *pe;
-	int i;
+	size_t i;
 
 	TAILQ_INIT(&paths);
 	for (i = nitems(path_list_input) - 1; i >= 0; i--) {
blob - 8306375617fb59493e4cb3afb9648ec208873a0c
blob + 334d9a659f385c9de036c79d21a1a527807feeb6
--- tog/tog.c
+++ tog/tog.c
@@ -6269,7 +6269,7 @@ done:
 static void
 list_commands(FILE *fp)
 {
-	int i;
+	size_t i;
 
 	fprintf(fp, "commands:");
 	for (i = 0; i < nitems(tog_commands); i++) {
@@ -6463,7 +6463,7 @@ main(int argc, char *argv[])
 		argc = 1;
 		cmd_argv = make_argv(argc, cmd->name);
 	} else {
-		int i;
+		size_t i;
 
 		/* Did the user specify a command? */
 		for (i = 0; i < nitems(tog_commands); i++) {