big endian warning fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2009-11-07 01:31:14 +01:00
parent 0d8c0b810e
commit 245a4f84be
4 changed files with 18 additions and 14 deletions

View File

@@ -615,7 +615,7 @@ xbsd_create_disklabel(void)
while (1) {
c = read_nonempty("Do you want to create a disklabel? (y/n) ");
if (c == 'y' || c == 'Y') {
if ((c|0x20) == 'y') {
if (xbsd_initlabel(
#if defined(__alpha__) || defined(__powerpc__) || defined(__hppa__) || \
defined(__s390__) || defined(__s390x__)
@@ -629,7 +629,7 @@ xbsd_create_disklabel(void)
}
return 0;
}
if (c == 'n')
if ((c|0x20) == 'n')
return 0;
}
}
@@ -964,6 +964,7 @@ xbsd_writelabel(struct partition *p)
#if !defined(__alpha__) && !defined(__powerpc__) && !defined(__hppa__)
sector = get_start_sect(p) + BSD_LABELSECTOR;
#else
(void)p; /* silence warning */
sector = BSD_LABELSECTOR;
#endif

View File

@@ -471,7 +471,8 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv)
strcpy(boot_blk->boot_jump, "\xeb\x58\x90" "mkdosfs"); // system_id[8] included :)
STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect);
STORE_LE(boot_blk->sect_per_clust, sect_per_clust);
STORE_LE(boot_blk->reserved_sect, reserved_sect);
// cast in needed on big endian to suppress a warning
STORE_LE(boot_blk->reserved_sect, (uint16_t)reserved_sect);
STORE_LE(boot_blk->fats, 2);
//STORE_LE(boot_blk->dir_entries, 0); // for FAT32, stays 0
if (volume_size_sect <= 0xffff)