diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-04 15:55:17 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-06-04 15:55:17 +0200 |
commit | 8878c24c7d15fe0d4df73aa8477251c6583f5157 (patch) | |
tree | 99b1860054e053676f887623270b7844cc7beb46 | |
parent | c46792492fa4a0b2631e9c711864f37a493aeef6 (diff) | |
download | busybox-w32-8878c24c7d15fe0d4df73aa8477251c6583f5157.tar.gz busybox-w32-8878c24c7d15fe0d4df73aa8477251c6583f5157.tar.bz2 busybox-w32-8878c24c7d15fe0d4df73aa8477251c6583f5157.zip |
mkfs_vfat: fix gcc-4.4 warning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mkfs_vfat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index ff3e4165a..c57cd9d5a 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c | |||
@@ -98,8 +98,9 @@ struct msdos_volume_info { /* (offsets are relative to start of boot sector) */ | |||
98 | } PACKED; /* 05a end. Total size 26 (0x1a) bytes */ | 98 | } PACKED; /* 05a end. Total size 26 (0x1a) bytes */ |
99 | 99 | ||
100 | struct msdos_boot_sector { | 100 | struct msdos_boot_sector { |
101 | char boot_jump[3]; /* 000 short or near jump instruction */ | 101 | /* We use strcpy to fill both, and gcc-4.4.x complains if they are separate */ |
102 | char system_id[8]; /* 003 name - can be used to special case partition manager volumes */ | 102 | char boot_jump_and_sys_id[3+8]; /* 000 short or near jump instruction */ |
103 | /*char system_id[8];*/ /* 003 name - can be used to special case partition manager volumes */ | ||
103 | uint16_t bytes_per_sect; /* 00b bytes per logical sector */ | 104 | uint16_t bytes_per_sect; /* 00b bytes per logical sector */ |
104 | uint8_t sect_per_clust; /* 00d sectors/cluster */ | 105 | uint8_t sect_per_clust; /* 00d sectors/cluster */ |
105 | uint16_t reserved_sect; /* 00e reserved sectors (sector offset of 1st FAT relative to volume start) */ | 106 | uint16_t reserved_sect; /* 00e reserved sectors (sector offset of 1st FAT relative to volume start) */ |
@@ -457,7 +458,7 @@ int mkfs_vfat_main(int argc UNUSED_PARAM, char **argv) | |||
457 | struct msdos_boot_sector *boot_blk = (void*)buf; | 458 | struct msdos_boot_sector *boot_blk = (void*)buf; |
458 | struct fat32_fsinfo *info = (void*)(buf + bytes_per_sect); | 459 | struct fat32_fsinfo *info = (void*)(buf + bytes_per_sect); |
459 | 460 | ||
460 | strcpy(boot_blk->boot_jump, "\xeb\x58\x90" "mkdosfs"); // system_id[8] included :) | 461 | strcpy(boot_blk->boot_jump_and_sys_id, "\xeb\x58\x90" "mkdosfs"); |
461 | STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect); | 462 | STORE_LE(boot_blk->bytes_per_sect, bytes_per_sect); |
462 | STORE_LE(boot_blk->sect_per_clust, sect_per_clust); | 463 | STORE_LE(boot_blk->sect_per_clust, sect_per_clust); |
463 | // cast in needed on big endian to suppress a warning | 464 | // cast in needed on big endian to suppress a warning |