diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-16 11:53:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-16 11:53:48 +0200 |
commit | dce39c98944ec6570dee5afc1e2edb16f87c1546 (patch) | |
tree | 6647e2765c24c37ed1612bbf837a785260b96a3f /util-linux/fsck_minix.c | |
parent | c4367d72272f72f647d7847129164901f3d47955 (diff) | |
download | busybox-w32-dce39c98944ec6570dee5afc1e2edb16f87c1546.tar.gz busybox-w32-dce39c98944ec6570dee5afc1e2edb16f87c1546.tar.bz2 busybox-w32-dce39c98944ec6570dee5afc1e2edb16f87c1546.zip |
fsck_minix,mkfs_minix: fix "strict-aliasing" warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux/fsck_minix.c')
-rw-r--r-- | util-linux/fsck_minix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c index 608048983..c4612f251 100644 --- a/util-linux/fsck_minix.c +++ b/util-linux/fsck_minix.c | |||
@@ -173,7 +173,10 @@ struct globals { | |||
173 | 173 | ||
174 | /* Bigger stuff */ | 174 | /* Bigger stuff */ |
175 | struct termios sv_termios; | 175 | struct termios sv_termios; |
176 | char superblock_buffer[BLOCK_SIZE]; | 176 | union { |
177 | char superblock_buffer[BLOCK_SIZE]; | ||
178 | struct minix_superblock Super; | ||
179 | } u; | ||
177 | char add_zone_ind_blk[BLOCK_SIZE]; | 180 | char add_zone_ind_blk[BLOCK_SIZE]; |
178 | char add_zone_dind_blk[BLOCK_SIZE]; | 181 | char add_zone_dind_blk[BLOCK_SIZE]; |
179 | IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) | 182 | IF_FEATURE_MINIX2(char add_zone_tind_blk[BLOCK_SIZE];) |
@@ -207,7 +210,7 @@ struct globals { | |||
207 | #define name_depth (G.name_depth ) | 210 | #define name_depth (G.name_depth ) |
208 | #define name_component (G.name_component ) | 211 | #define name_component (G.name_component ) |
209 | #define sv_termios (G.sv_termios ) | 212 | #define sv_termios (G.sv_termios ) |
210 | #define superblock_buffer (G.superblock_buffer ) | 213 | #define superblock_buffer (G.u.superblock_buffer) |
211 | #define add_zone_ind_blk (G.add_zone_ind_blk ) | 214 | #define add_zone_ind_blk (G.add_zone_ind_blk ) |
212 | #define add_zone_dind_blk (G.add_zone_dind_blk ) | 215 | #define add_zone_dind_blk (G.add_zone_dind_blk ) |
213 | #define add_zone_tind_blk (G.add_zone_tind_blk ) | 216 | #define add_zone_tind_blk (G.add_zone_tind_blk ) |
@@ -247,7 +250,7 @@ enum { | |||
247 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) | 250 | #define Inode1 (((struct minix1_inode *) inode_buffer)-1) |
248 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) | 251 | #define Inode2 (((struct minix2_inode *) inode_buffer)-1) |
249 | 252 | ||
250 | #define Super (*(struct minix_superblock *)(superblock_buffer)) | 253 | #define Super (G.u.Super) |
251 | 254 | ||
252 | #if ENABLE_FEATURE_MINIX2 | 255 | #if ENABLE_FEATURE_MINIX2 |
253 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) | 256 | # define ZONES ((unsigned)(version2 ? Super.s_zones : Super.s_nzones)) |