diff --git a/82802ab.c b/82802ab.c
index 1046da4..281b66e 100644
--- a/82802ab.c
+++ b/82802ab.c
@@ -126,7 +126,7 @@
 /* chunksize is 1 */
 int write_82802ab(struct flashctx *flash, const uint8_t *src, unsigned int start, unsigned int len)
 {
-	int i;
+	unsigned int i;
 	chipaddr dst = flash->virtual_memory + start;
 
 	for (i = 0; i < len; i++) {
@@ -144,7 +144,7 @@
 {
 	chipaddr bios = flash->virtual_memory;
 	uint8_t mcfg, bcfg, need_unlock = 0, can_unlock = 0;
-	int i;
+	unsigned int i;
 
 	/* Clear status register */
 	chip_writeb(flash, 0x50, bios);
@@ -197,7 +197,7 @@
 	chipaddr bios = flash->virtual_memory;
 	uint8_t mcfg, bcfg;
 	uint8_t need_unlock = 0, can_unlock = 0;
-	int i;
+	unsigned int i;
 
 	/* Wait if chip is busy */
 	wait_82802ab(flash);
diff --git a/at45db.c b/at45db.c
index 38c0685..5f949bb 100644
--- a/at45db.c
+++ b/at45db.c
@@ -463,9 +463,9 @@
 	}
 
 	/* Create a suitable buffer to store opcode, address and data chunks for buffer1. */
-	const int max_data_write = flash->mst->spi.max_data_write - 4;
-	const unsigned int max_chunk = (max_data_write > 0 && max_data_write <= page_size) ?
-				       max_data_write : page_size;
+	const unsigned int max_data_write = flash->mst->spi.max_data_write;
+	const unsigned int max_chunk = max_data_write > 4 && max_data_write - 4 <= page_size ?
+				       max_data_write - 4 : page_size;
 	uint8_t buf[4 + max_chunk];
 
 	buf[0] = AT45DB_BUFFER1_WRITE;
diff --git a/bitbang_spi.c b/bitbang_spi.c
index 2dad149..7c183c3 100644
--- a/bitbang_spi.c
+++ b/bitbang_spi.c
@@ -150,7 +150,7 @@
 				    const unsigned char *writearr,
 				    unsigned char *readarr)
 {
-	int i;
+	unsigned int i;
 	const struct bitbang_spi_master *master = flash->mst->spi.data;
 
 	/* FIXME: Run bitbang_spi_request_bus here or in programmer init?
diff --git a/board_enable.c b/board_enable.c
index 5876036..74612f5 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -373,7 +373,8 @@
 
 static const struct winbond_chip *winbond_superio_chipdef(void)
 {
-	int i, j;
+	int i;
+	unsigned int j;
 
 	for (i = 0; i < superio_count; i++) {
 		if (superios[i].vendor != SUPERIO_VENDOR_WINBOND)
diff --git a/buspirate_spi.c b/buspirate_spi.c
index fb066c2..08cd04c 100644
--- a/buspirate_spi.c
+++ b/buspirate_spi.c
@@ -76,7 +76,8 @@
 static int buspirate_sendrecv(unsigned char *buf, unsigned int writecnt,
 			      unsigned int readcnt)
 {
-	int i, ret = 0;
+	unsigned int i;
+	int ret = 0;
 
 	msg_pspew("%s: write %i, read %i ", __func__, writecnt, readcnt);
 	if (!writecnt && !readcnt) {
diff --git a/cbtable.c b/cbtable.c
index fe0c368..bdf53ce 100644
--- a/cbtable.c
+++ b/cbtable.c
@@ -34,7 +34,7 @@
  *	-1	if IDs in the image do not match the IDs embedded in the current firmware,
  *	 0	if the IDs could not be found in the image or if they match correctly.
  */
-int cb_check_image(const uint8_t *image, int size)
+int cb_check_image(const uint8_t *image, unsigned int size)
 {
 	const unsigned int *walk;
 	unsigned int mb_part_offset, mb_vendor_offset;
@@ -138,10 +138,10 @@
 		((((char *)rec) + rec->size) <= (((char *)head) + sizeof(*head) + head->table_bytes)); \
 		rec = (struct lb_record *)(((char *)rec) + rec->size))
 
-static int count_lb_records(struct lb_header *head)
+static unsigned int count_lb_records(struct lb_header *head)
 {
 	struct lb_record *rec;
-	int count;
+	unsigned int count;
 
 	count = 0;
 	for_each_lbrec(head, rec) {
diff --git a/cli_classic.c b/cli_classic.c
index 0591bfe..b4112fd 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -507,7 +507,7 @@
 
 	for (j = 0; j < registered_master_count; j++) {
 		startchip = 0;
-		while (chipcount < ARRAY_SIZE(flashes)) {
+		while (chipcount < (int)ARRAY_SIZE(flashes)) {
 			startchip = probe_flash(&registered_masters[j], startchip, &flashes[chipcount], 0);
 			if (startchip == -1)
 				break;
diff --git a/dediprog.c b/dediprog.c
index 3566109..fbd6930 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -474,7 +474,7 @@
 		return 1;
 
 	int ret = dediprog_write(CMD_READ, value, idx, data_packet, sizeof(data_packet));
-	if (ret != sizeof(data_packet)) {
+	if (ret != (int)sizeof(data_packet)) {
 		msg_perr("Command Read SPI Bulk failed, %i %s!\n", ret, libusb_error_name(ret));
 		return 1;
 	}
@@ -487,7 +487,7 @@
 
 	/* Allocate bulk transfers. */
 	unsigned int i;
-	for (i = 0; i < min(DEDIPROG_ASYNC_TRANSFERS, count); ++i) {
+	for (i = 0; i < MIN(DEDIPROG_ASYNC_TRANSFERS, count); ++i) {
 		transfers[i] = libusb_alloc_transfer(0);
 		if (!transfers[i]) {
 			msg_perr("Allocating libusb transfer %i failed: %s!\n", i, libusb_error_name(ret));
@@ -630,7 +630,7 @@
 	if (prepare_rw_cmd(flash, data_packet, count, dedi_spi_cmd, &value, &idx, start, 0))
 		return 1;
 	int ret = dediprog_write(CMD_WRITE, value, idx, data_packet, sizeof(data_packet));
-	if (ret != sizeof(data_packet)) {
+	if (ret != (int)sizeof(data_packet)) {
 		msg_perr("Command Write SPI Bulk failed, %s!\n", libusb_error_name(ret));
 		return 1;
 	}
@@ -743,7 +743,7 @@
 		value = 0;
 	}
 	ret = dediprog_write(CMD_TRANSCEIVE, value, idx, writearr, writecnt);
-	if (ret != writecnt) {
+	if (ret != (int)writecnt) {
 		msg_perr("Send SPI failed, expected %i, got %i %s!\n",
 			 writecnt, ret, libusb_error_name(ret));
 		return 1;
@@ -770,7 +770,7 @@
 	ret = dediprog_read(CMD_TRANSCEIVE, value, idx, readarr, readcnt);
 	*/
 	ret = dediprog_read(CMD_TRANSCEIVE, 0, 0, readarr, readcnt);
-	if (ret != readcnt) {
+	if (ret != (int)readcnt) {
 		msg_perr("Receive SPI failed, expected %i, got %i %s!\n", readcnt, ret, libusb_error_name(ret));
 		return 1;
 	}
@@ -804,7 +804,7 @@
 	int sfnum;
 	int fw[3];
 	if (sscanf(buf, "SF%d V:%d.%d.%d ", &sfnum, &fw[0], &fw[1], &fw[2]) != 4 ||
-	    sfnum != dediprog_devicetype) {
+	    sfnum != (int)dediprog_devicetype) {
 		msg_perr("Unexpected firmware version string '%s'\n", buf);
 		return 1;
 	}
diff --git a/dmi.c b/dmi.c
index ae90f7c..9ec935a 100644
--- a/dmi.c
+++ b/dmi.c
@@ -147,7 +147,7 @@
 
 static void dmi_chassis_type(uint8_t code)
 {
-	int i;
+	unsigned int i;
 	code &= 0x7f; /* bits 6:0 are chassis type, 7th bit is the lock bit */
 	is_laptop = 2;
 	for (i = 0; i < ARRAY_SIZE(dmi_chassis_types); i++) {
@@ -161,7 +161,7 @@
 
 static void dmi_table(uint32_t base, uint16_t len, uint16_t num)
 {
-	int i = 0, j = 0;
+	unsigned int i = 0, j = 0;
 
 	uint8_t *dmi_table_mem = physmap_ro("DMI Table", base, len);
 	if (dmi_table_mem == NULL) {
@@ -346,7 +346,7 @@
 
 static int dmi_fill(void)
 {
-	int i;
+	unsigned int i;
 	char *chassis_type;
 
 	msg_pdbg("Using External DMI decoder.\n");
@@ -376,7 +376,7 @@
 
 static int dmi_shutdown(void *data)
 {
-	int i;
+	unsigned int i;
 	for (i = 0; i < ARRAY_SIZE(dmi_strings); i++) {
 		free(dmi_strings[i].value);
 		dmi_strings[i].value = NULL;
@@ -406,7 +406,7 @@
 	}
 
 	has_dmi_support = 1;
-	int i;
+	unsigned int i;
 	for (i = 0; i < ARRAY_SIZE(dmi_strings); i++) {
 		msg_pdbg("DMI string %s: \"%s\"\n", dmi_strings[i].keyword,
 			 (dmi_strings[i].value == NULL) ? "" : dmi_strings[i].value);
@@ -463,7 +463,7 @@
 
 int dmi_match(const char *pattern)
 {
-	int i;
+	unsigned int i;
 
 	if (!has_dmi_support)
 		return 0;
diff --git a/dummyflasher.c b/dummyflasher.c
index 8f3dfda..0caffc9 100644
--- a/dummyflasher.c
+++ b/dummyflasher.c
@@ -58,8 +58,8 @@
 static unsigned int emu_jedec_ce_c7_size = 0;
 static unsigned char spi_blacklist[256];
 static unsigned char spi_ignorelist[256];
-static int spi_blacklist_size = 0;
-static int spi_ignorelist_size = 0;
+static unsigned int spi_blacklist_size = 0;
+static unsigned int spi_ignorelist_size = 0;
 static uint8_t emu_status = 0;
 
 /* A legit complete SFDP table based on the MX25L6436E (rev. 1.8) datasheet. */
@@ -151,7 +151,7 @@
 {
 	char *bustext = NULL;
 	char *tmp = NULL;
-	int i;
+	unsigned int i;
 #if EMULATE_SPI_CHIP
 	char *status = NULL;
 #endif
@@ -231,7 +231,7 @@
 		msg_pdbg("SPI blacklist is ");
 		for (i = 0; i < spi_blacklist_size; i++)
 			msg_pdbg("%02x ", spi_blacklist[i]);
-		msg_pdbg(", size %i\n", spi_blacklist_size);
+		msg_pdbg(", size %u\n", spi_blacklist_size);
 	}
 	free(tmp);
 
@@ -267,7 +267,7 @@
 		msg_pdbg("SPI ignorelist is ");
 		for (i = 0; i < spi_ignorelist_size; i++)
 			msg_pdbg("%02x ", spi_ignorelist[i]);
-		msg_pdbg(", size %i\n", spi_ignorelist_size);
+		msg_pdbg(", size %u\n", spi_ignorelist_size);
 	}
 	free(tmp);
 
@@ -819,7 +819,7 @@
 				  const unsigned char *writearr,
 				  unsigned char *readarr)
 {
-	int i;
+	unsigned int i;
 
 	msg_pspew("%s:", __func__);
 
diff --git a/en29lv640b.c b/en29lv640b.c
index 550642d..5b01904 100644
--- a/en29lv640b.c
+++ b/en29lv640b.c
@@ -29,7 +29,7 @@
 /* chunksize is 1 */
 int write_en29lv640b(struct flashctx *flash, const uint8_t *src, unsigned int start, unsigned int len)
 {
-	int i;
+	unsigned int i;
 	chipaddr bios = flash->virtual_memory;
 	chipaddr dst = flash->virtual_memory + start;
 
diff --git a/flash.h b/flash.h
index b60a980..c1d8980 100644
--- a/flash.h
+++ b/flash.h
@@ -301,7 +301,11 @@
 
 /* helpers.c */
 uint32_t address_to_bits(uint32_t addr);
-int bitcount(unsigned long a);
+unsigned int bitcount(unsigned long a);
+#undef MIN
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#undef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
 int max(int a, int b);
 int min(int a, int b);
 char *strcat_realloc(char *dest, const char *src);
diff --git a/flashrom.c b/flashrom.c
index cb1dca6..06b1854 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1253,7 +1253,7 @@
 		ret = 1;
 		goto out;
 	}
-	if (image_stat.st_size != size) {
+	if (image_stat.st_size != (intmax_t)size) {
 		msg_gerr("Error: Image size (%jd B) doesn't match the flash chip's size (%lu B)!\n",
 			 (intmax_t)image_stat.st_size, size);
 		ret = 1;
diff --git a/fmap.c b/fmap.c
index 31f282f..ca25651 100644
--- a/fmap.c
+++ b/fmap.c
@@ -96,7 +96,7 @@
 	off_t offset;
 	bool fmap_found = 0;
 
-	for (offset = 0; offset <= len - sizeof(struct fmap); offset++) {
+	for (offset = 0; offset <= (off_t)(len - sizeof(struct fmap)); offset++) {
 		if (is_valid_fmap((struct fmap *)&buf[offset])) {
 			fmap_found = 1;
 			break;
@@ -178,7 +178,7 @@
 }
 
 static int fmap_bsearch_rom(struct fmap **fmap_out, struct flashctx *const flashctx,
-		size_t rom_offset, size_t len, int min_stride)
+		size_t rom_offset, size_t len, size_t min_stride)
 {
 	size_t stride, fmap_len = 0;
 	int ret = 1, fmap_found = 0, check_offset_0 = 1;
diff --git a/helpers.c b/helpers.c
index a714908..cfa9812 100644
--- a/helpers.c
+++ b/helpers.c
@@ -30,9 +30,9 @@
 	return 32 - lzb;
 }
 
-int bitcount(unsigned long a)
+unsigned int bitcount(unsigned long a)
 {
-	int i = 0;
+	unsigned int i = 0;
 	for (; a != 0; a >>= 1)
 		if (a & 1)
 			i++;
diff --git a/ich_descriptors.c b/ich_descriptors.c
index a757add..684b845 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -35,10 +35,6 @@
 #include "flash.h" /* for msg_* */
 #include "programmer.h"
 
-#ifndef min
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
 ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_content *const cont)
 {
 	switch (cs) {
@@ -365,7 +361,7 @@
 
 void prettyprint_ich_descriptor_region(const enum ich_chipset cs, const struct ich_descriptors *const desc)
 {
-	size_t i;
+	ssize_t i;
 	const ssize_t nr = ich_number_of_regions(cs, &desc->content);
 	msg_pdbg2("=== Region Section ===\n");
 	if (nr < 0) {
@@ -374,18 +370,18 @@
 		return;
 	}
 	for (i = 0; i < nr; i++)
-		msg_pdbg2("FLREG%zu   0x%08x\n", i, desc->region.FLREGs[i]);
+		msg_pdbg2("FLREG%zd   0x%08x\n", i, desc->region.FLREGs[i]);
 	msg_pdbg2("\n");
 
 	msg_pdbg2("--- Details ---\n");
 	for (i = 0; i < nr; i++)
-		pprint_freg(&desc->region, i);
+		pprint_freg(&desc->region, (uint32_t)i);
 	msg_pdbg2("\n");
 }
 
 void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct ich_descriptors *const desc)
 {
-	size_t i;
+	ssize_t i;
 	const ssize_t nm = ich_number_of_masters(cs, &desc->content);
 	msg_pdbg2("=== Master Section ===\n");
 	if (nm < 0) {
@@ -394,7 +390,7 @@
 		return;
 	}
 	for (i = 0; i < nm; i++)
-		msg_pdbg2("FLMSTR%zu  0x%08x\n", i + 1, desc->master.FLMSTRs[i]);
+		msg_pdbg2("FLMSTR%zd  0x%08x\n", i + 1, desc->master.FLMSTRs[i]);
 	msg_pdbg2("\n");
 
 	msg_pdbg2("--- Details ---\n");
@@ -402,7 +398,7 @@
 		const char *const master_names[] = {
 			"BIOS", "ME", "GbE", "unknown", "EC",
 		};
-		if (nm >= ARRAY_SIZE(master_names)) {
+		if (nm >= (ssize_t)ARRAY_SIZE(master_names)) {
 			msg_pdbg2("%s: number of masters too high (%d).\n", __func__,
 				  desc->content.NM + 1);
 			return;
@@ -423,7 +419,7 @@
 			"BIOS", "ME", "GbE", "DE", "BMC", "IE",
 		};
 		/* NM starts at 1 instead of 0 for LBG */
-		if (nm > ARRAY_SIZE(master_names)) {
+		if (nm > (ssize_t)ARRAY_SIZE(master_names)) {
 			msg_pdbg2("%s: number of masters too high (%d).\n", __func__,
 				  desc->content.NM);
 			return;
@@ -446,14 +442,14 @@
 		}
 	} else if (cs == CHIPSET_APOLLO_LAKE) {
 		const char *const master_names[] = { "BIOS", "TXE", };
-		if (nm > ARRAY_SIZE(master_names)) {
+		if (nm > (ssize_t)ARRAY_SIZE(master_names)) {
 			msg_pdbg2("%s: number of masters too high (%d).\n", __func__, desc->content.NM);
 			return;
 		}
 
 		msg_pdbg2("       FD   IFWI  TXE   n/a  Platf DevExp\n");
 		for (i = 0; i < nm; i++) {
-			size_t j;
+			ssize_t j;
 			msg_pdbg2("%-4s", master_names[i]);
 			for (j = 0; j < ich_number_of_regions(cs, &desc->content); j++)
 				msg_pdbg2("   %c%c ",
@@ -799,7 +795,7 @@
 	unsigned int i, max_count;
 	msg_pdbg2("=== Softstraps ===\n");
 
-	max_count = min(ARRAY_SIZE(desc->north.STRPs), desc->content.MSL);
+	max_count = MIN(ARRAY_SIZE(desc->north.STRPs), desc->content.MSL);
 	if (max_count < desc->content.MSL) {
 		msg_pdbg2("MSL (%u) is greater than the current maximum of %u entries.\n",
 			  desc->content.MSL, max_count);
@@ -811,7 +807,7 @@
 		msg_pdbg2("STRP%-2d = 0x%08x\n", i, desc->north.STRPs[i]);
 	msg_pdbg2("\n");
 
-	max_count = min(ARRAY_SIZE(desc->south.STRPs), desc->content.ISL);
+	max_count = MIN(ARRAY_SIZE(desc->south.STRPs), desc->content.ISL);
 	if (max_count < desc->content.ISL) {
 		msg_pdbg2("ISL (%u) is greater than the current maximum of %u entries.\n",
 			  desc->content.ISL, max_count);
@@ -965,8 +961,8 @@
 int read_ich_descriptors_from_dump(const uint32_t *const dump, const size_t len,
 				   enum ich_chipset *const cs, struct ich_descriptors *const desc)
 {
-	size_t i, max_count;
-	uint8_t pch_bug_offset = 0;
+	ssize_t i, max_count;
+	size_t pch_bug_offset = 0;
 
 	if (dump == NULL || desc == NULL)
 		return ICH_RET_PARAM;
@@ -1000,14 +996,14 @@
 
 	/* region */
 	const ssize_t nr = ich_number_of_regions(*cs, &desc->content);
-	if (nr < 0 || len < getFRBA(&desc->content) + nr * 4)
+	if (nr < 0 || len < getFRBA(&desc->content) + (size_t)nr * 4)
 		return ICH_RET_OOB;
 	for (i = 0; i < nr; i++)
 		desc->region.FLREGs[i] = dump[(getFRBA(&desc->content) >> 2) + i];
 
 	/* master */
 	const ssize_t nm = ich_number_of_masters(*cs, &desc->content);
-	if (nm < 0 || len < getFMBA(&desc->content) + nm * 4)
+	if (nm < 0 || len < getFMBA(&desc->content) + (size_t)nm * 4)
 		return ICH_RET_OOB;
 	for (i = 0; i < nm; i++)
 		desc->master.FLMSTRs[i] = dump[(getFMBA(&desc->content) >> 2) + i];
@@ -1034,7 +1030,7 @@
 		return ICH_RET_OOB;
 
 	/* limit the range to be written */
-	max_count = min(sizeof(desc->north.STRPs) / 4, desc->content.MSL);
+	max_count = MIN(sizeof(desc->north.STRPs) / 4, desc->content.MSL);
 	for (i = 0; i < max_count; i++)
 		desc->north.STRPs[i] = dump[(getFMSBA(&desc->content) >> 2) + i];
 
@@ -1043,7 +1039,7 @@
 		return ICH_RET_OOB;
 
 	/* limit the range to be written */
-	max_count = min(sizeof(desc->south.STRPs) / 4, desc->content.ISL);
+	max_count = MIN(sizeof(desc->south.STRPs) / 4, desc->content.ISL);
 	for (i = 0; i < max_count; i++)
 		desc->south.STRPs[i] = dump[(getFISBA(&desc->content) >> 2) + i];
 
@@ -1134,7 +1130,7 @@
 
 int read_ich_descriptors_via_fdo(enum ich_chipset cs, void *spibar, struct ich_descriptors *desc)
 {
-	size_t i;
+	ssize_t i;
 	struct ich_desc_region *r = &desc->region;
 
 	/* Test if bit-fields are working as expected.
@@ -1226,7 +1222,8 @@
 	memset(layout, 0x00, sizeof(*layout));
 
 	ssize_t i, j;
-	for (i = 0, j = 0; i < min(ich_number_of_regions(cs, &desc.content), ARRAY_SIZE(regions)); ++i) {
+	const ssize_t nr = MIN(ich_number_of_regions(cs, &desc.content), (ssize_t)ARRAY_SIZE(regions));
+	for (i = 0, j = 0; i < nr; ++i) {
 		const chipoff_t base = ICH_FREG_BASE(desc.region.FLREGs[i]);
 		const chipoff_t limit = ICH_FREG_LIMIT(desc.region.FLREGs[i]);
 		if (limit <= base)
diff --git a/ichspi.c b/ichspi.c
index e1ede60..8b8f0f6 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -470,7 +470,7 @@
 
 static uint8_t lookup_spi_type(uint8_t opcode)
 {
-	int a;
+	unsigned int a;
 
 	for (a = 0; a < ARRAY_SIZE(POSSIBLE_OPCODES); a++) {
 		if (POSSIBLE_OPCODES[a].opcode == opcode)
@@ -1564,7 +1564,7 @@
 	"locked", "read-only", "write-only", "read-write"
 };
 
-static enum ich_access_protection ich9_handle_frap(uint32_t frap, int i)
+static enum ich_access_protection ich9_handle_frap(uint32_t frap, unsigned int i)
 {
 	const int rwperms_unknown = ARRAY_SIZE(access_names);
 	static const char *const region_names[6] = {
@@ -1595,23 +1595,23 @@
 	limit = ICH_FREG_LIMIT(freg);
 	if (base > limit || (freg == 0 && i > 0)) {
 		/* this FREG is disabled */
-		msg_pdbg2("0x%02X: 0x%08x FREG%i: %s region is unused.\n",
+		msg_pdbg2("0x%02X: 0x%08x FREG%u: %s region is unused.\n",
 			  offset, freg, i, region_name);
 		return NO_PROT;
 	}
 	msg_pdbg("0x%02X: 0x%08x ", offset, freg);
 	if (rwperms == 0x3) {
-		msg_pdbg("FREG%i: %s region (0x%08x-0x%08x) is %s.\n", i,
+		msg_pdbg("FREG%u: %s region (0x%08x-0x%08x) is %s.\n", i,
 			 region_name, base, limit, access_names[rwperms]);
 		return NO_PROT;
 	}
 	if (rwperms == rwperms_unknown) {
-		msg_pdbg("FREG%i: %s region (0x%08x-0x%08x) has unknown permissions.\n",
+		msg_pdbg("FREG%u: %s region (0x%08x-0x%08x) has unknown permissions.\n",
 			 i, region_name, base, limit);
 		return NO_PROT;
 	}
 
-	msg_pinfo("FREG%i: %s region (0x%08x-0x%08x) is %s.\n", i,
+	msg_pinfo("FREG%u: %s region (0x%08x-0x%08x) is %s.\n", i,
 		  region_name, base, limit, access_names[rwperms]);
 	return access_perms_to_protection[rwperms];
 }
@@ -1625,7 +1625,7 @@
 #define ICH_PR_PERMS(pr)	(((~((pr) >> PR_RP_OFF) & 1) << 0) | \
 				 ((~((pr) >> PR_WP_OFF) & 1) << 1))
 
-static enum ich_access_protection ich9_handle_pr(const size_t reg_pr0, int i)
+static enum ich_access_protection ich9_handle_pr(const size_t reg_pr0, unsigned int i)
 {
 	uint8_t off = reg_pr0 + (i * 4);
 	uint32_t pr = mmio_readl(ich_spibar + off);
@@ -1701,7 +1701,7 @@
 
 int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
 {
-	int i;
+	unsigned int i;
 	uint16_t tmp2;
 	uint32_t tmp;
 	char *arg;
@@ -1786,7 +1786,7 @@
 		for (i = 0; i < 3; i++) {
 			int offs;
 			offs = 0x60 + (i * 4);
-			msg_pdbg("0x%02x: 0x%08x (PBR%d)\n", offs,
+			msg_pdbg("0x%02x: 0x%08x (PBR%u)\n", offs,
 				     mmio_readl(ich_spibar + offs), i);
 		}
 		if (mmio_readw(ich_spibar) & (1 << 15)) {
diff --git a/it85spi.c b/it85spi.c
index 3cd5514..5ce9193 100644
--- a/it85spi.c
+++ b/it85spi.c
@@ -327,7 +327,7 @@
 				   const unsigned char *writearr,
 				   unsigned char *readarr)
 {
-	int i;
+	unsigned int i;
 
 	it85xx_enter_scratch_rom();
 	/* Exit scratch ROM ONLY when programmer shuts down. Otherwise, the
diff --git a/it87spi.c b/it87spi.c
index f8b2b0f..f5955fe 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -281,7 +281,6 @@
 				    unsigned char *readarr)
 {
 	uint8_t busy, writeenc;
-	int i;
 
 	do {
 		busy = INB(it8716f_flashport) & 0x80;
@@ -330,6 +329,8 @@
 		| ((readcnt & 0x3) << 2) | (writeenc), it8716f_flashport);
 
 	if (readcnt > 0) {
+		unsigned int i;
+
 		do {
 			busy = INB(it8716f_flashport) & 0x80;
 		} while (busy);
diff --git a/jedec.c b/jedec.c
index ac1ea0d..0709efa 100644
--- a/jedec.c
+++ b/jedec.c
@@ -408,7 +408,8 @@
 int write_jedec_1(struct flashctx *flash, const uint8_t *src, unsigned int start,
 		  unsigned int len)
 {
-	int i, failed = 0;
+	unsigned int i;
+	int failed = 0;
 	chipaddr dst = flash->virtual_memory + start;
 	chipaddr olddst;
 	unsigned int mask;
@@ -430,7 +431,8 @@
 static int write_page_write_jedec_common(struct flashctx *flash, const uint8_t *src,
 					 unsigned int start, unsigned int page_size)
 {
-	int i, tried = 0, failed;
+	unsigned int i;
+	int tried = 0, failed;
 	const uint8_t *s = src;
 	chipaddr bios = flash->virtual_memory;
 	chipaddr dst = bios + start;
diff --git a/layout.c b/layout.c
index 6e476c2..d80b01f 100644
--- a/layout.c
+++ b/layout.c
@@ -46,7 +46,8 @@
 	struct flashrom_layout *const layout = get_global_layout();
 	FILE *romlayout;
 	char tempstr[256], tempname[256];
-	int i, ret = 1;
+	unsigned int i;
+	int ret = 1;
 
 	romlayout = fopen(name, "r");
 
@@ -154,7 +155,7 @@
  */
 int process_include_args(struct flashrom_layout *l, const struct layout_include_args *const args)
 {
-	int found = 0;
+	unsigned int found = 0;
 	const struct layout_include_args *tmp;
 
 	if (args == NULL)
@@ -193,7 +194,7 @@
 void layout_cleanup(struct layout_include_args **args)
 {
 	struct flashrom_layout *const layout = get_global_layout();
-	int i;
+	unsigned int i;
 	struct layout_include_args *tmp;
 
 	while (*args) {
@@ -216,7 +217,7 @@
 	chipsize_t total_size = flash->chip->total_size * 1024;
 	int ret = 0;
 
-	int i;
+	unsigned int i;
 	for (i = 0; i < layout->num_entries; i++) {
 		if (layout->entries[i].start >= total_size || layout->entries[i].end >= total_size) {
 			msg_gwarn("Warning: Address range of region \"%s\" exceeds the current chip's "
diff --git a/pickit2_spi.c b/pickit2_spi.c
index 52021d9..784dc13 100644
--- a/pickit2_spi.c
+++ b/pickit2_spi.c
@@ -209,7 +209,7 @@
 	}
 
 	uint8_t buf[CMD_LENGTH] = {CMD_DOWNLOAD_DATA, writecnt};
-	int i = 2;
+	unsigned int i = 2;
 	for (; i < writecnt + 2; i++) {
 		buf[i] = writearr[i - 2];
 	}
diff --git a/print.c b/print.c
index cfe6267..2901c50 100644
--- a/print.c
+++ b/print.c
@@ -19,6 +19,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+#include <stddef.h>
 #include "flash.h"
 #include "programmer.h"
 
@@ -314,20 +315,20 @@
 #if CONFIG_INTERNAL == 1
 static void print_supported_chipsets(void)
 {
-	int i, chipsetcount = 0;
+	unsigned int i, chipsetcount = 0;
 	const struct penable *c = chipset_enables;
-	int maxvendorlen = strlen("Vendor") + 1;
-	int maxchipsetlen = strlen("Chipset") + 1;
+	size_t maxvendorlen = strlen("Vendor") + 1;
+	size_t maxchipsetlen = strlen("Chipset") + 1;
 
 	for (c = chipset_enables; c->vendor_name != NULL; c++) {
 		chipsetcount++;
-		maxvendorlen = max(maxvendorlen, strlen(c->vendor_name));
-		maxchipsetlen = max(maxchipsetlen, strlen(c->device_name));
+		maxvendorlen = MAX(maxvendorlen, strlen(c->vendor_name));
+		maxchipsetlen = MAX(maxchipsetlen, strlen(c->device_name));
 	}
 	maxvendorlen++;
 	maxchipsetlen++;
 
-	msg_ginfo("Supported chipsets (total: %d):\n\n", chipsetcount);
+	msg_ginfo("Supported chipsets (total: %u):\n\n", chipsetcount);
 
 	msg_ginfo("Vendor");
 	for (i = strlen("Vendor"); i < maxvendorlen; i++)
@@ -354,12 +355,12 @@
 static void print_supported_boards_helper(const struct board_info *boards,
 				   const char *devicetype)
 {
-	int i;
+	unsigned int i;
 	unsigned int boardcount_good = 0, boardcount_bad = 0, boardcount_nt = 0;
 	const struct board_match *e = board_matches;
 	const struct board_info *b = boards;
-	int maxvendorlen = strlen("Vendor") + 1;
-	int maxboardlen = strlen("Board") + 1;
+	size_t maxvendorlen = strlen("Vendor") + 1;
+	size_t maxboardlen = strlen("Board") + 1;
 
 	for (b = boards; b->vendor != NULL; b++) {
 		maxvendorlen = max(maxvendorlen, strlen(b->vendor));
diff --git a/print_wiki.c b/print_wiki.c
index ea8c4d7..b2ac65c 100644
--- a/print_wiki.c
+++ b/print_wiki.c
@@ -245,7 +245,7 @@
 					   "<span id=\"%s_note%d\">%d. [[#%s_ref%d|&#x2191;]]</span>"
 					   " <nowiki>%s</nowiki><br />\n", devicetype, num_notes, num_notes,
 					   devicetype, num_notes, boards[i].note);
-			if (ret < 0 || ret >= sizeof(tmp)) {
+			if (ret < 0 || (unsigned int)ret >= sizeof(tmp)) {
 				fprintf(stderr, "Footnote text #%d of %s truncated (ret=%d, sizeof(tmp)=%zu)\n",
 					num_notes, devicetype, ret, sizeof(tmp));
 			}
diff --git a/programmer.h b/programmer.h
index f4e8b46..dfa6ebd 100644
--- a/programmer.h
+++ b/programmer.h
@@ -304,7 +304,7 @@
 
 /* cbtable.c */
 int cb_parse_table(const char **vendor, const char **model);
-int cb_check_image(const uint8_t *bios, int size);
+int cb_check_image(const uint8_t *bios, unsigned int size);
 
 /* dmi.c */
 #if defined(__i386__) || defined(__x86_64__)
diff --git a/sb600spi.c b/sb600spi.c
index fd9487c..3026836 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -247,7 +247,7 @@
 
 	reset_internal_fifo_pointer();
 	msg_pspew("Filling FIFO: ");
-	int count;
+	unsigned int count;
 	for (count = 0; count < writecnt; count++) {
 		msg_pspew("[%02x]", writearr[count]);
 		mmio_writeb(writearr[count], sb600_spibar + 0xC);
@@ -326,7 +326,7 @@
 	mmio_writeb(readcnt, sb600_spibar + 0x4b);
 
 	msg_pspew("Filling buffer: ");
-	int count;
+	unsigned int count;
 	for (count = 0; count < writecnt; count++) {
 		msg_pspew("[%02x]", writearr[count]);
 		mmio_writeb(writearr[count], sb600_spibar + 0x80 + count);
diff --git a/serial.c b/serial.c
index e61df74..3a99dbf 100644
--- a/serial.c
+++ b/serial.c
@@ -480,10 +480,10 @@
 	}
 #endif
 
-	int i;
-	int rd_bytes = 0;
+	unsigned int i;
+	unsigned int rd_bytes = 0;
 	for (i = 0; i < timeout; i++) {
-		msg_pspew("readcnt %d rd_bytes %d\n", readcnt, rd_bytes);
+		msg_pspew("readcnt %u rd_bytes %u\n", readcnt, rd_bytes);
 #if IS_WINDOWS
 		ReadFile(sp_fd, c + rd_bytes, readcnt - rd_bytes, &rv, NULL);
 		msg_pspew("read %lu bytes\n", rv);
@@ -560,10 +560,10 @@
 	}
 #endif
 
-	int i;
-	int wr_bytes = 0;
+	unsigned int i;
+	unsigned int wr_bytes = 0;
 	for (i = 0; i < timeout; i++) {
-		msg_pspew("writecnt %d wr_bytes %d\n", writecnt, wr_bytes);
+		msg_pspew("writecnt %u wr_bytes %u\n", writecnt, wr_bytes);
 #if IS_WINDOWS
 		WriteFile(sp_fd, buf + wr_bytes, writecnt - wr_bytes, &rv, NULL);
 		msg_pspew("wrote %lu bytes\n", rv);
diff --git a/serprog.c b/serprog.c
index b6c85c9..37a9db4 100644
--- a/serprog.c
+++ b/serprog.c
@@ -71,8 +71,8 @@
 static uint32_t sp_write_n_bytes = 0;
 
 /* sp_streamed_* used for flow control checking */
-static int sp_streamed_transmit_ops = 0;
-static int sp_streamed_transmit_bytes = 0;
+static unsigned int sp_streamed_transmit_ops = 0;
+static unsigned int sp_streamed_transmit_bytes = 0;
 
 /* sp_opbuf_usage used for counting the amount of
 	on-device operation buffer used */
diff --git a/sst28sf040.c b/sst28sf040.c
index 9df27b9..3da25f1 100644
--- a/sst28sf040.c
+++ b/sst28sf040.c
@@ -75,7 +75,7 @@
 /* chunksize is 1 */
 int write_28sf040(struct flashctx *flash, const uint8_t *src, unsigned int start, unsigned int len)
 {
-	int i;
+	unsigned int i;
 	chipaddr bios = flash->virtual_memory;
 	chipaddr dst = flash->virtual_memory + start;
 
diff --git a/sst_fwhub.c b/sst_fwhub.c
index c712303..d688a35 100644
--- a/sst_fwhub.c
+++ b/sst_fwhub.c
@@ -21,7 +21,7 @@
 #include "flash.h"
 #include "chipdrivers.h"
 
-static int check_sst_fwhub_block_lock(struct flashctx *flash, int offset)
+static int check_sst_fwhub_block_lock(struct flashctx *flash, unsigned int offset)
 {
 	chipaddr registers = flash->virtual_registers;
 	uint8_t blockstatus;
@@ -47,7 +47,7 @@
 	return blockstatus & 0x1;
 }
 
-static int clear_sst_fwhub_block_lock(struct flashctx *flash, int offset)
+static int clear_sst_fwhub_block_lock(struct flashctx *flash, unsigned int offset)
 {
 	chipaddr registers = flash->virtual_registers;
 	uint8_t blockstatus;
@@ -67,7 +67,7 @@
 
 int printlock_sst_fwhub(struct flashctx *flash)
 {
-	int i;
+	unsigned int i;
 
 	for (i = 0; i < flash->chip->total_size * 1024; i += flash->chip->page_size)
 		check_sst_fwhub_block_lock(flash, i);
@@ -77,7 +77,8 @@
 
 int unlock_sst_fwhub(struct flashctx *flash)
 {
-	int i, ret=0;
+	unsigned int i;
+	int ret = 0;
 
 	for (i = 0; i < flash->chip->total_size * 1024; i += flash->chip->page_size)
 	{
diff --git a/usbblaster_spi.c b/usbblaster_spi.c
index 886cb57..d6b5084 100644
--- a/usbblaster_spi.c
+++ b/usbblaster_spi.c
@@ -119,11 +119,11 @@
 
 static int send_write(unsigned int writecnt, const unsigned char *writearr)
 {
-	int i;
 	uint8_t buf[BUF_SIZE];
 
 	memset(buf, 0, sizeof(buf));
 	while (writecnt) {
+		unsigned int i;
 		unsigned int n_write = min(writecnt, BUF_SIZE - 1);
 		msg_pspew("writing %d-byte packet\n", n_write);
 
diff --git a/wbsio_spi.c b/wbsio_spi.c
index 28b568e..f4f6af9 100644
--- a/wbsio_spi.c
+++ b/wbsio_spi.c
@@ -115,7 +115,7 @@
 				  const unsigned char *writearr,
 				  unsigned char *readarr)
 {
-	int i;
+	unsigned int i;
 	uint8_t mode = 0;
 
 	msg_pspew("%s:", __func__);
