aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--e2fsprogs/blkid/probe.c8
-rw-r--r--e2fsprogs/ext2fs/ext2fs_inline.c2
-rw-r--r--e2fsprogs/mke2fs.c6
-rw-r--r--modutils/insmod.c6
-rw-r--r--util-linux/fdisk.c22
-rw-r--r--util-linux/mkswap.c4
6 files changed, 27 insertions, 21 deletions
diff --git a/e2fsprogs/blkid/probe.c b/e2fsprogs/blkid/probe.c
index 2aaa50885..36f7177b8 100644
--- a/e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/blkid/probe.c
@@ -340,7 +340,7 @@ static int probe_swap1(int fd,
340 /* arbitrary sanity check.. is there any garbage down there? */ 340 /* arbitrary sanity check.. is there any garbage down there? */
341 if (sws->sws_pad[32] == 0 && sws->sws_pad[33] == 0) { 341 if (sws->sws_pad[32] == 0 && sws->sws_pad[33] == 0) {
342 if (sws->sws_volume[0]) 342 if (sws->sws_volume[0])
343 blkid_set_tag(dev, "LABEL", sws->sws_volume, 343 blkid_set_tag(dev, "LABEL", (const char*)sws->sws_volume,
344 sizeof(sws->sws_volume)); 344 sizeof(sws->sws_volume));
345 if (sws->sws_uuid[0]) 345 if (sws->sws_uuid[0])
346 set_uuid(dev, sws->sws_uuid); 346 set_uuid(dev, sws->sws_uuid);
@@ -415,8 +415,8 @@ static int probe_ocfs(int fd __BLKID_ATTR((unused)),
415 else if (major >= 9) 415 else if (major >= 9)
416 blkid_set_tag(dev,"SEC_TYPE","ntocfs",sizeof("ntocfs")); 416 blkid_set_tag(dev,"SEC_TYPE","ntocfs",sizeof("ntocfs"));
417 417
418 blkid_set_tag(dev, "LABEL", ovl.label, ocfslabellen(ovl)); 418 blkid_set_tag(dev, "LABEL", (const char*)ovl.label, ocfslabellen(ovl));
419 blkid_set_tag(dev, "MOUNT", ovh.mount, ocfsmountlen(ovh)); 419 blkid_set_tag(dev, "MOUNT", (const char*)ovh.mount, ocfsmountlen(ovh));
420 set_uuid(dev, ovl.vol_id); 420 set_uuid(dev, ovl.vol_id);
421 return 0; 421 return 0;
422} 422}
@@ -431,7 +431,7 @@ static int probe_ocfs2(int fd __BLKID_ATTR((unused)),
431 431
432 osb = (struct ocfs2_super_block *)buf; 432 osb = (struct ocfs2_super_block *)buf;
433 433
434 blkid_set_tag(dev, "LABEL", osb->s_label, sizeof(osb->s_label)); 434 blkid_set_tag(dev, "LABEL", (const char*)osb->s_label, sizeof(osb->s_label));
435 set_uuid(dev, osb->s_uuid); 435 set_uuid(dev, osb->s_uuid);
436 return 0; 436 return 0;
437} 437}
diff --git a/e2fsprogs/ext2fs/ext2fs_inline.c b/e2fsprogs/ext2fs/ext2fs_inline.c
index 2fa9a9ed2..73d393d20 100644
--- a/e2fsprogs/ext2fs/ext2fs_inline.c
+++ b/e2fsprogs/ext2fs/ext2fs_inline.c
@@ -178,7 +178,7 @@ __u32 ext2fs_swab32(__u32 val)
178 178
179int ext2fs_find_first_bit_set(void * addr, unsigned size) 179int ext2fs_find_first_bit_set(void * addr, unsigned size)
180{ 180{
181 char *cp = (unsigned char *) addr; 181 unsigned char *cp = (unsigned char *) addr;
182 int res = 0, d0; 182 int res = 0, d0;
183 183
184 if (!size) 184 if (!size)
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index 10563e2d9..09d42aacf 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -878,8 +878,12 @@ BLOCKSIZE_ERROR:
878 mke2fs_warning_msg(1, "fragments not supported. Ignoring -f option"); 878 mke2fs_warning_msg(1, "fragments not supported. Ignoring -f option");
879 break; 879 break;
880 case 'g': 880 case 'g':
881 if (safe_strtoi(optarg, &param.s_blocks_per_group)) { 881 {
882 int foo;
883 if (safe_strtoi(optarg, &foo)) {
882 bb_error_msg_and_die("Illegal number for blocks per group"); 884 bb_error_msg_and_die("Illegal number for blocks per group");
885 }
886 param.s_blocks_per_group = foo;
883 } 887 }
884 if ((param.s_blocks_per_group % 8) != 0) { 888 if ((param.s_blocks_per_group % 8) != 0) {
885 bb_error_msg_and_die("blocks per group must be multiple of 8"); 889 bb_error_msg_and_die("blocks per group must be multiple of 8");
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 390a50316..96d9d5b7d 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -860,9 +860,11 @@ arch_apply_relocation(struct obj_file *f,
860#if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES) 860#if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES)
861 struct arch_symbol *isym = (struct arch_symbol *) sym; 861 struct arch_symbol *isym = (struct arch_symbol *) sym;
862#endif 862#endif
863#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) || defined(__sh__) || defined(__s390__)
863#if defined(CONFIG_USE_GOT_ENTRIES) 864#if defined(CONFIG_USE_GOT_ENTRIES)
864 ElfW(Addr) got = ifile->got ? ifile->got->header.sh_addr : 0; 865 ElfW(Addr) got = ifile->got ? ifile->got->header.sh_addr : 0;
865#endif 866#endif
867#endif
866#if defined(CONFIG_USE_PLT_ENTRIES) 868#if defined(CONFIG_USE_PLT_ENTRIES)
867 ElfW(Addr) plt = ifile->plt ? ifile->plt->header.sh_addr : 0; 869 ElfW(Addr) plt = ifile->plt ? ifile->plt->header.sh_addr : 0;
868 unsigned long *ip; 870 unsigned long *ip;
@@ -892,7 +894,7 @@ arch_apply_relocation(struct obj_file *f,
892 * (which is .got) similar to branch, 894 * (which is .got) similar to branch,
893 * but is full 32 bits relative */ 895 * but is full 32 bits relative */
894 896
895 assert(got); 897 assert(got != 0);
896 *loc += got - dot; 898 *loc += got - dot;
897 break; 899 break;
898 900
@@ -901,7 +903,7 @@ arch_apply_relocation(struct obj_file *f,
901 goto bb_use_plt; 903 goto bb_use_plt;
902 904
903 case R_ARM_GOTOFF: /* address relative to the got */ 905 case R_ARM_GOTOFF: /* address relative to the got */
904 assert(got); 906 assert(got != 0);
905 *loc += v - got; 907 *loc += v - got;
906 break; 908 break;
907 909
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}