aboutsummaryrefslogtreecommitdiff
path: root/util-linux/mkfs_vfat.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-02-15 13:46:34 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-02-15 13:46:34 +0100
commit7398892ac0592999397532ba168376edd402438c (patch)
treec487cbbb0fe75bce23db81bdf808cf8ecb98b70e /util-linux/mkfs_vfat.c
parenta48eadbc22d3892481826e0b7dc4c7a5d2baad5c (diff)
downloadbusybox-7398892ac0592999397532ba168376edd402438c.tar.gz
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 'util-linux/mkfs_vfat.c')
-rw-r--r--util-linux/mkfs_vfat.c6
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);
#define STORE_LE(field, value) \
do { \
if (sizeof(field) == 4) \
- field = SWAP_LE32(value); \
+ field = SWAP_LE32((uint32_t)(value)); \
else if (sizeof(field) == 2) \
- field = SWAP_LE16(value); \
+ field = SWAP_LE16((uint16_t)(value)); \
else if (sizeof(field) == 1) \
- field = (value); \
+ field = (uint8_t)(value); \
else \
BUG_unsupported_field_size(); \
} while (0)