btrfs-progs: use unsigned type for bit shift values

Bit shifts should be done on unsigned types, do that in remaining code.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2023-10-24 21:03:56 +02:00
parent c9d04fae03
commit c9ebef41ec
3 changed files with 11 additions and 11 deletions

View File

@ -291,8 +291,8 @@ static int do_balance_v1(int fd)
}
enum {
BALANCE_START_FILTERS = 1 << 0,
BALANCE_START_NOWARN = 1 << 1
BALANCE_START_FILTERS = 1U << 0,
BALANCE_START_NOWARN = 1U << 1
};
static int do_balance(const char *path, struct btrfs_ioctl_balance_args *args,

View File

@ -18,11 +18,11 @@
#define __BTRFS_COMMANDS_H__
enum {
CMD_HIDDEN = (1 << 0), /* should not be in help listings */
CMD_ALIAS = (1 << 1), /* alias of next command in cmd_group */
CMD_FORMAT_TEXT = (1 << 2), /* output as plain text */
CMD_FORMAT_JSON = (1 << 3), /* output in json */
CMD_DRY_RUN = (1 << 4), /* Accepts global --dry-run option. */
CMD_HIDDEN = (1U << 0), /* should not be in help listings */
CMD_ALIAS = (1U << 1), /* alias of next command in cmd_group */
CMD_FORMAT_TEXT = (1U << 2), /* output as plain text */
CMD_FORMAT_JSON = (1U << 3), /* output in json */
CMD_DRY_RUN = (1U << 4), /* Accepts global --dry-run option. */
};
#define CMD_FORMAT_MASK (CMD_FORMAT_TEXT | CMD_FORMAT_JSON)

View File

@ -18,10 +18,10 @@
#define __BTRFS_PROPS_H__
enum prop_object_type {
prop_object_dev = (1 << 0),
prop_object_root = (1 << 1),
prop_object_subvol = (1 << 2),
prop_object_inode = (1 << 3),
prop_object_dev = (1U << 0),
prop_object_root = (1U << 1),
prop_object_subvol = (1U << 2),
prop_object_inode = (1U << 3),
__prop_object_max,
};