diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-15 13:46:34 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-02-15 13:46:34 +0100 |
commit | 7398892ac0592999397532ba168376edd402438c (patch) | |
tree | c487cbbb0fe75bce23db81bdf808cf8ecb98b70e /util-linux/mkfs_vfat.c | |
parent | a48eadbc22d3892481826e0b7dc4c7a5d2baad5c (diff) | |
download | busybox-w32-7398892ac0592999397532ba168376edd402438c.tar.gz busybox-w32-7398892ac0592999397532ba168376edd402438c.tar.bz2 busybox-w32-7398892ac0592999397532ba168376edd402438c.zip |
mkfs_ext2, mkfs_vfat: fix warnings in STORE_LE on big-endian platforms
"warning: large integer implicitly truncated to unsigned type [-Woverflow]"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to '')
-rw-r--r-- | util-linux/mkfs_vfat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c index 426854b1e..26a919536 100644 --- a/util-linux/mkfs_vfat.c +++ b/util-linux/mkfs_vfat.c | |||
@@ -210,11 +210,11 @@ void BUG_unsupported_field_size(void); | |||
210 | #define STORE_LE(field, value) \ | 210 | #define STORE_LE(field, value) \ |
211 | do { \ | 211 | do { \ |
212 | if (sizeof(field) == 4) \ | 212 | if (sizeof(field) == 4) \ |
213 | field = SWAP_LE32(value); \ | 213 | field = SWAP_LE32((uint32_t)(value)); \ |
214 | else if (sizeof(field) == 2) \ | 214 | else if (sizeof(field) == 2) \ |
215 | field = SWAP_LE16(value); \ | 215 | field = SWAP_LE16((uint16_t)(value)); \ |
216 | else if (sizeof(field) == 1) \ | 216 | else if (sizeof(field) == 1) \ |
217 | field = (value); \ | 217 | field = (uint8_t)(value); \ |
218 | else \ | 218 | else \ |
219 | BUG_unsupported_field_size(); \ | 219 | BUG_unsupported_field_size(); \ |
220 | } while (0) | 220 | } while (0) |