diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 6edf9c3..48bea42 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1908,10 +1908,10 @@
 	    if (sgilabel->directory[i].vol_file_size) {
 	    uint32_t start = SGI_SSWAP32(sgilabel->directory[i].vol_file_start);
 	    uint32_t len = SGI_SSWAP32(sgilabel->directory[i].vol_file_size);
-	    char*name = sgilabel->directory[i].vol_file_name;
+	    unsigned char*name = sgilabel->directory[i].vol_file_name;
 
 	    printf(_("%2d: %-10s sector%5u size%8u\n"),
-		    i, name, (unsigned int) start, (unsigned int) len);
+		    i, (char*)name, (unsigned int) start, (unsigned int) len);
 	}
     }
 }
@@ -1953,7 +1953,7 @@
     }
 		}
 	}
-	if (strncmp(aFile, sgilabel->boot_file, 16)) {
+	if (strncmp(aFile, (char*)sgilabel->boot_file, 16)) {
 		printf(_("\n\tBe aware, that the bootfile is not checked for existence.\n\t"
 			 "SGI's default is \"/unix\" and for backup \"/unix.save\".\n"));
 	/* filename is correct and did change */
@@ -1964,7 +1964,7 @@
 
 static const char *
 sgi_get_bootfile(void) {
-	return sgilabel->boot_file;
+	return (char*)sgilabel->boot_file;
 }
 
 static void
@@ -1990,7 +1990,7 @@
     /* I keep SGI's habit to write the sgilabel to the second block */
     sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2);
     sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo));
-    strncpy(sgilabel->directory[0].vol_file_name, "sgilabel", 8);
+    strncpy((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8);
 }
 
 static sgiinfo *fill_sgiinfo(void);
@@ -2007,7 +2007,7 @@
 	fdisk_fatal(unable_to_seek);
      if (write(fd, sgilabel, SECTOR_SIZE) != SECTOR_SIZE)
 	fdisk_fatal(unable_to_write);
-     if (! strncmp(sgilabel->directory[0].vol_file_name, "sgilabel", 8)) {
+     if (! strncmp((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8)) {
 	/*
 	 * keep this habit of first writing the "sgilabel".
 	 * I never tested whether it works without (AN 981002).
@@ -2389,7 +2389,7 @@
 
     /* sizeof(sgilabel->boot_file) = 16 > 6 */
     memset(sgilabel->boot_file, 0, 16);
-    strcpy(sgilabel->boot_file, "/unix");
+    strcpy((char*)sgilabel->boot_file, "/unix");
 
     sgilabel->devparam.skew                     = (0);
     sgilabel->devparam.gap1                     = (0);
@@ -2451,10 +2451,10 @@
     info->b2=SGI_SSWAP16(-1);
     info->b3=SGI_SSWAP16(1);
     /* You may want to replace this string !!!!!!! */
-    strcpy( info->scsi_string, "IBM OEM 0662S12         3 30" );
-    strcpy( info->serial, "0000" );
+    strcpy( (char*)info->scsi_string, "IBM OEM 0662S12         3 30" );
+    strcpy( (char*)info->serial, "0000" );
     info->check1816 = SGI_SSWAP16(18*256 +16 );
-    strcpy( info->installer, "Sfx version 5.3, Oct 18, 1994" );
+    strcpy( (char*)info->installer, "Sfx version 5.3, Oct 18, 1994" );
     return info;
 }
 #endif /* SGI_LABEL */
@@ -3937,7 +3937,7 @@
 	int first = 1;
 	int bad = 0;
 
-	if (!(valid_part_table_flag(bufp)))
+	if (!(valid_part_table_flag((char*)bufp)))
 		return;
 
 	hh = ss = 0;
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 1fc648f..e203f0d 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -70,7 +70,7 @@
  */
 
 static int pagesize;
-static int *signature_page;
+static unsigned int *signature_page;
 
 static struct swap_header_v1 {
 	char bootbits[1024];		/* Space for disklabel etc. */
@@ -89,7 +89,7 @@
 	if (pagesize != PAGE_SIZE)
 		bb_error_msg("Assuming pages of size %d", pagesize);
 #endif
-	signature_page = (int *) xmalloc(pagesize);
+	signature_page = (unsigned int *) xmalloc(pagesize);
 	memset(signature_page, 0, pagesize);
 	p = (struct swap_header_v1 *) signature_page;
 }
