summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 2aaa508..36f7177 100644
--- a/e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/blkid/probe.c
@@ -340,7 +340,7 @@ static int probe_swap1(int fd,
/* arbitrary sanity check.. is there any garbage down there? */
if (sws->sws_pad[32] == 0 && sws->sws_pad[33] == 0) {
if (sws->sws_volume[0])
- blkid_set_tag(dev, "LABEL", sws->sws_volume,
+ blkid_set_tag(dev, "LABEL", (const char*)sws->sws_volume,
sizeof(sws->sws_volume));
if (sws->sws_uuid[0])
set_uuid(dev, sws->sws_uuid);
@@ -415,8 +415,8 @@ static int probe_ocfs(int fd __BLKID_ATTR((unused)),
else if (major >= 9)
blkid_set_tag(dev,"SEC_TYPE","ntocfs",sizeof("ntocfs"));
- blkid_set_tag(dev, "LABEL", ovl.label, ocfslabellen(ovl));
- blkid_set_tag(dev, "MOUNT", ovh.mount, ocfsmountlen(ovh));
+ blkid_set_tag(dev, "LABEL", (const char*)ovl.label, ocfslabellen(ovl));
+ blkid_set_tag(dev, "MOUNT", (const char*)ovh.mount, ocfsmountlen(ovh));
set_uuid(dev, ovl.vol_id);
return 0;
}
@@ -431,7 +431,7 @@ static int probe_ocfs2(int fd __BLKID_ATTR((unused)),
osb = (struct ocfs2_super_block *)buf;
- blkid_set_tag(dev, "LABEL", osb->s_label, sizeof(osb->s_label));
+ blkid_set_tag(dev, "LABEL", (const char*)osb->s_label, sizeof(osb->s_label));
set_uuid(dev, osb->s_uuid);
return 0;
}
diff --git a/e2fsprogs/ext2fs/ext2fs_inline.c b/e2fsprogs/ext2fs/ext2fs_inline.c
index 2fa9a9e..73d393d 100644
--- a/e2fsprogs/ext2fs/ext2fs_inline.c
+++ b/e2fsprogs/ext2fs/ext2fs_inline.c
@@ -178,7 +178,7 @@ __u32 ext2fs_swab32(__u32 val)
int ext2fs_find_first_bit_set(void * addr, unsigned size)
{
- char *cp = (unsigned char *) addr;
+ unsigned char *cp = (unsigned char *) addr;
int res = 0, d0;
if (!size)
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c
index 10563e2..09d42aa 100644
--- a/e2fsprogs/mke2fs.c
+++ b/e2fsprogs/mke2fs.c
@@ -878,8 +878,12 @@ BLOCKSIZE_ERROR:
mke2fs_warning_msg(1, "fragments not supported. Ignoring -f option");
break;
case 'g':
- if (safe_strtoi(optarg, &param.s_blocks_per_group)) {
+ {
+ int foo;
+ if (safe_strtoi(optarg, &foo)) {
bb_error_msg_and_die("Illegal number for blocks per group");
+ }
+ param.s_blocks_per_group = foo;
}
if ((param.s_blocks_per_group % 8) != 0) {
bb_error_msg_and_die("blocks per group must be multiple of 8");
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 390a503..96d9d5b 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -860,9 +860,11 @@ arch_apply_relocation(struct obj_file *f,
#if defined(CONFIG_USE_GOT_ENTRIES) || defined(CONFIG_USE_PLT_ENTRIES)
struct arch_symbol *isym = (struct arch_symbol *) sym;
#endif
+#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) || defined(__sh__) || defined(__s390__)
#if defined(CONFIG_USE_GOT_ENTRIES)
ElfW(Addr) got = ifile->got ? ifile->got->header.sh_addr : 0;
#endif
+#endif
#if defined(CONFIG_USE_PLT_ENTRIES)
ElfW(Addr) plt = ifile->plt ? ifile->plt->header.sh_addr : 0;
unsigned long *ip;
@@ -892,7 +894,7 @@ arch_apply_relocation(struct obj_file *f,
* (which is .got) similar to branch,
* but is full 32 bits relative */
- assert(got);
+ assert(got != 0);
*loc += got - dot;
break;
@@ -901,7 +903,7 @@ arch_apply_relocation(struct obj_file *f,
goto bb_use_plt;
case R_ARM_GOTOFF: /* address relative to the got */
- assert(got);
+ assert(got != 0);
*loc += v - got;
break;
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 @@ sgi_list_table(int xtra) {
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 @@ sgi_check_bootfile(const char* aFile) {
}
}
}
- 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 @@ sgi_check_bootfile(const char* aFile) {
static const char *
sgi_get_bootfile(void) {
- return sgilabel->boot_file;
+ return (char*)sgilabel->boot_file;
}
static void
@@ -1990,7 +1990,7 @@ create_sgiinfo(void)
/* 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 @@ sgi_write_table(void) {
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 @@ create_sgilabel(void)
/* 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 @@ fill_sgiinfo(void)
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 @@ get_partition_table_geometry(void) {
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 version = -1;
*/
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 @@ static inline void init_signature_page(void)
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;
}