aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-01-30 23:09:20 +0000
committerEric Andersen <andersen@codepoet.org>2006-01-30 23:09:20 +0000
commit3496fdc9a573a424e34141cbe04250cc8df15e32 (patch)
treea78bfa0e539dcdbb024ed1acb9fba333dfacc228 /util-linux
parenta68ea1cb93c29125bc4f30ddd415fca02249e010 (diff)
downloadbusybox-w32-3496fdc9a573a424e34141cbe04250cc8df15e32.tar.gz
busybox-w32-3496fdc9a573a424e34141cbe04250cc8df15e32.tar.bz2
busybox-w32-3496fdc9a573a424e34141cbe04250cc8df15e32.zip
hopefully the last of the annoying signed/unsigned and mixed type errors
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/fdisk.c22
-rw-r--r--util-linux/mkswap.c4
2 files changed, 13 insertions, 13 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 6edf9c31e..48bea42c9 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -1908,10 +1908,10 @@ sgi_list_table(int xtra) {
1908 if (sgilabel->directory[i].vol_file_size) { 1908 if (sgilabel->directory[i].vol_file_size) {
1909 uint32_t start = SGI_SSWAP32(sgilabel->directory[i].vol_file_start); 1909 uint32_t start = SGI_SSWAP32(sgilabel->directory[i].vol_file_start);
1910 uint32_t len = SGI_SSWAP32(sgilabel->directory[i].vol_file_size); 1910 uint32_t len = SGI_SSWAP32(sgilabel->directory[i].vol_file_size);
1911 char*name = sgilabel->directory[i].vol_file_name; 1911 unsigned char*name = sgilabel->directory[i].vol_file_name;
1912 1912
1913 printf(_("%2d: %-10s sector%5u size%8u\n"), 1913 printf(_("%2d: %-10s sector%5u size%8u\n"),
1914 i, name, (unsigned int) start, (unsigned int) len); 1914 i, (char*)name, (unsigned int) start, (unsigned int) len);
1915 } 1915 }
1916 } 1916 }
1917} 1917}
@@ -1953,7 +1953,7 @@ sgi_check_bootfile(const char* aFile) {
1953 } 1953 }
1954 } 1954 }
1955 } 1955 }
1956 if (strncmp(aFile, sgilabel->boot_file, 16)) { 1956 if (strncmp(aFile, (char*)sgilabel->boot_file, 16)) {
1957 printf(_("\n\tBe aware, that the bootfile is not checked for existence.\n\t" 1957 printf(_("\n\tBe aware, that the bootfile is not checked for existence.\n\t"
1958 "SGI's default is \"/unix\" and for backup \"/unix.save\".\n")); 1958 "SGI's default is \"/unix\" and for backup \"/unix.save\".\n"));
1959 /* filename is correct and did change */ 1959 /* filename is correct and did change */
@@ -1964,7 +1964,7 @@ sgi_check_bootfile(const char* aFile) {
1964 1964
1965static const char * 1965static const char *
1966sgi_get_bootfile(void) { 1966sgi_get_bootfile(void) {
1967 return sgilabel->boot_file; 1967 return (char*)sgilabel->boot_file;
1968} 1968}
1969 1969
1970static void 1970static void
@@ -1990,7 +1990,7 @@ create_sgiinfo(void)
1990 /* I keep SGI's habit to write the sgilabel to the second block */ 1990 /* I keep SGI's habit to write the sgilabel to the second block */
1991 sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2); 1991 sgilabel->directory[0].vol_file_start = SGI_SSWAP32(2);
1992 sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo)); 1992 sgilabel->directory[0].vol_file_size = SGI_SSWAP32(sizeof(sgiinfo));
1993 strncpy(sgilabel->directory[0].vol_file_name, "sgilabel", 8); 1993 strncpy((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8);
1994} 1994}
1995 1995
1996static sgiinfo *fill_sgiinfo(void); 1996static sgiinfo *fill_sgiinfo(void);
@@ -2007,7 +2007,7 @@ sgi_write_table(void) {
2007 fdisk_fatal(unable_to_seek); 2007 fdisk_fatal(unable_to_seek);
2008 if (write(fd, sgilabel, SECTOR_SIZE) != SECTOR_SIZE) 2008 if (write(fd, sgilabel, SECTOR_SIZE) != SECTOR_SIZE)
2009 fdisk_fatal(unable_to_write); 2009 fdisk_fatal(unable_to_write);
2010 if (! strncmp(sgilabel->directory[0].vol_file_name, "sgilabel", 8)) { 2010 if (! strncmp((char*)sgilabel->directory[0].vol_file_name, "sgilabel", 8)) {
2011 /* 2011 /*
2012 * keep this habit of first writing the "sgilabel". 2012 * keep this habit of first writing the "sgilabel".
2013 * I never tested whether it works without (AN 981002). 2013 * I never tested whether it works without (AN 981002).
@@ -2389,7 +2389,7 @@ create_sgilabel(void)
2389 2389
2390 /* sizeof(sgilabel->boot_file) = 16 > 6 */ 2390 /* sizeof(sgilabel->boot_file) = 16 > 6 */
2391 memset(sgilabel->boot_file, 0, 16); 2391 memset(sgilabel->boot_file, 0, 16);
2392 strcpy(sgilabel->boot_file, "/unix"); 2392 strcpy((char*)sgilabel->boot_file, "/unix");
2393 2393
2394 sgilabel->devparam.skew = (0); 2394 sgilabel->devparam.skew = (0);
2395 sgilabel->devparam.gap1 = (0); 2395 sgilabel->devparam.gap1 = (0);
@@ -2451,10 +2451,10 @@ fill_sgiinfo(void)
2451 info->b2=SGI_SSWAP16(-1); 2451 info->b2=SGI_SSWAP16(-1);
2452 info->b3=SGI_SSWAP16(1); 2452 info->b3=SGI_SSWAP16(1);
2453 /* You may want to replace this string !!!!!!! */ 2453 /* You may want to replace this string !!!!!!! */
2454 strcpy( info->scsi_string, "IBM OEM 0662S12 3 30" ); 2454 strcpy( (char*)info->scsi_string, "IBM OEM 0662S12 3 30" );
2455 strcpy( info->serial, "0000" ); 2455 strcpy( (char*)info->serial, "0000" );
2456 info->check1816 = SGI_SSWAP16(18*256 +16 ); 2456 info->check1816 = SGI_SSWAP16(18*256 +16 );
2457 strcpy( info->installer, "Sfx version 5.3, Oct 18, 1994" ); 2457 strcpy( (char*)info->installer, "Sfx version 5.3, Oct 18, 1994" );
2458 return info; 2458 return info;
2459} 2459}
2460#endif /* SGI_LABEL */ 2460#endif /* SGI_LABEL */
@@ -3937,7 +3937,7 @@ get_partition_table_geometry(void) {
3937 int first = 1; 3937 int first = 1;
3938 int bad = 0; 3938 int bad = 0;
3939 3939
3940 if (!(valid_part_table_flag(bufp))) 3940 if (!(valid_part_table_flag((char*)bufp)))
3941 return; 3941 return;
3942 3942
3943 hh = ss = 0; 3943 hh = ss = 0;
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index 1fc648f3a..e203f0db6 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -70,7 +70,7 @@ static int version = -1;
70 */ 70 */
71 71
72static int pagesize; 72static int pagesize;
73static int *signature_page; 73static unsigned int *signature_page;
74 74
75static struct swap_header_v1 { 75static struct swap_header_v1 {
76 char bootbits[1024]; /* Space for disklabel etc. */ 76 char bootbits[1024]; /* Space for disklabel etc. */
@@ -89,7 +89,7 @@ static inline void init_signature_page(void)
89 if (pagesize != PAGE_SIZE) 89 if (pagesize != PAGE_SIZE)
90 bb_error_msg("Assuming pages of size %d", pagesize); 90 bb_error_msg("Assuming pages of size %d", pagesize);
91#endif 91#endif
92 signature_page = (int *) xmalloc(pagesize); 92 signature_page = (unsigned int *) xmalloc(pagesize);
93 memset(signature_page, 0, pagesize); 93 memset(signature_page, 0, pagesize);
94 p = (struct swap_header_v1 *) signature_page; 94 p = (struct swap_header_v1 *) signature_page;
95} 95}