hopefully the last of the annoying signed/unsigned and mixed type errors

This commit is contained in:
Eric Andersen
2006-01-30 23:09:20 +00:00
parent a68ea1cb93
commit 3496fdc9a5
6 changed files with 27 additions and 21 deletions

View File

@@ -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;
}

View File

@@ -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)

View File

@@ -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");