diff --git a/src/browser.c b/src/browser.c
index 519370ed0e5d29a398fb9ac26ed17d3c42114931..9d8ed49e2b361b7379df4172f7654615d2b6debf 100644
--- a/src/browser.c
+++ b/src/browser.c
@@ -32,9 +32,9 @@ static char **filelist = NULL;
 		/* The list of files to display in the file browser. */
 static size_t filelist_len = 0;
 		/* The number of files in the list. */
-static int width = 0;
+static size_t width = 0;
 		/* The number of files that we can display per screen row. */
-static int longest = 0;
+static size_t longest = 0;
 		/* The number of columns in the longest filename in the list. */
 static size_t selected = 0;
 		/* The currently selected filename in the list; zero-based. */
@@ -258,9 +258,9 @@ char *do_browser(char *path)
 
 			/* In case the specified directory cannot be entered, select it
 			 * (if it is in the current list) so it will be highlighted. */
-			for (i = 0; i < filelist_len; i++)
-				if (strcmp(filelist[i], path) == 0)
-					selected = i;
+			for (size_t j = 0; j < filelist_len; j++)
+				if (strcmp(filelist[j], path) == 0)
+					selected = j;
 
 			/* Try opening and reading the specified directory. */
 			goto read_directory_contents;
@@ -525,7 +525,7 @@ void browser_refresh(void)
 				/* The length of the filename in columns. */
 		size_t infolen;
 				/* The length of the file information in columns. */
-		int infomaxlen = 7;
+		size_t infomaxlen = 7;
 				/* The maximum length of the file information in columns:
 				 * normally seven, but will be twelve for "(parent dir)". */
 		bool dots = (COLS >= 15 && namelen >= longest - infomaxlen);
diff --git a/src/files.c b/src/files.c
index 4c27f46c6e0b02d15927fd6f9baadf04a62e2f45..39678d6e7ab02fcde69b07e4d6f54d550d33dfd1 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2600,7 +2600,8 @@ char *input_tab(char *buf, bool allow_files, size_t *place,
 		if (!*lastwastab)
 			*lastwastab = TRUE;
 		else if (num_matches > 1) {
-			int longest_name = 0, ncols, editline = 0;
+			size_t longest_name = 0, ncols;
+			int editline = 0;
 
 			/* Sort the list of available choices. */
 			qsort(matches, num_matches, sizeof(char *), diralphasort);
diff --git a/src/help.c b/src/help.c
index b95fe5597cc8a101113aa8698f769417c25e17af..69d1093a74e431b1366cd9149d9c4ad42b2b35a2 100644
--- a/src/help.c
+++ b/src/help.c
@@ -46,7 +46,7 @@ char *tempfilename = NULL;
  * read that file into a new buffer. */
 void wrap_the_help_text(bool redisplaying)
 {
-	int sum = 0;
+	size_t sum = 0;
 	const char *ptr = start_of_body;
 	FILE *tempfile = fopen(tempfilename, "w+b");
 
diff --git a/src/prompt.c b/src/prompt.c
index f4585eb20c503fbd12b2f09add1d4805d829eecc..acadecb8d012629db95dcb437da460851c2015f6 100644
--- a/src/prompt.c
+++ b/src/prompt.c
@@ -187,7 +187,7 @@ void do_statusbar_output(int *the_input, size_t input_len,
 {
 	char *output = charalloc(input_len + 1);
 	char onechar[MAXCHARLEN];
-	int i, char_len;
+	size_t char_len, i;
 
 	/* Copy the typed stuff so it can be treated. */
 	for (i = 0; i < input_len; i++)
diff --git a/src/text.c b/src/text.c
index da0b10b5828b0d84c1eb980a0e8b4d908603d7d9..efe123fdaad86682de0fa92611b05081d7fa36a0 100644
--- a/src/text.c
+++ b/src/text.c
@@ -3577,8 +3577,8 @@ char *copy_completion(char *check_line, int start)
 void complete_a_word(void)
 {
 	char *shard, *completion = NULL;
-	int start_of_shard, shard_length = 0;
-	int i = 0, j = 0;
+	size_t start_of_shard, shard_length = 0;
+	size_t i = 0, j = 0;
 	completion_word *some_word;
 #ifdef ENABLE_WRAPPING
 	bool was_set_wrapping = !ISSET(NO_WRAP);
diff --git a/src/utils.c b/src/utils.c
index 91f279a4d43eafd825f8f0785bbf530ad000d4a9..40f9348df2d9b3e8a44d9b637ed4490aec3c0bd9 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -456,7 +456,7 @@ size_t strnlenpt(const char *text, size_t maxlen)
 		return 0;
 
 	while (*text != '\0') {
-		int charlen = parse_mbchar(text, NULL, &width);
+		size_t charlen = parse_mbchar(text, NULL, &width);
 
 		if (maxlen <= charlen)
 			break;