summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Buchbinder <abuchbinder@google.com>2017-07-10 14:29:09 -0700
committerDavid Sterba <dsterba@suse.com>2017-07-20 17:43:43 +0200
commit3987fb6f076485e8e63aa279e0d3438084b5dcf4 (patch)
treea5a45be668f3e1c2fb0d98f6c60b5fa99d484c17
parent50d037b4590ea8eea376d19ad89c152776b4225c (diff)
btrfs-progs: Tighten integer types in print-tree
There are likely more places where the wrong size types are used, but these tripped Clang's warnings because they eventually get passed to printf. Signed-off-by: Adam Buchbinder <abuchbinder@google.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--print-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/print-tree.c b/print-tree.c
index 07366e98..5927ed35 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -197,7 +197,7 @@ static void qgroup_flags_to_str(u64 flags, char *ret)
void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk)
{
- int num_stripes = btrfs_chunk_num_stripes(eb, chunk);
+ u16 num_stripes = btrfs_chunk_num_stripes(eb, chunk);
int i;
u32 chunk_item_size = btrfs_chunk_item_size(num_stripes);
char chunk_flags_str[32] = {0};
@@ -336,7 +336,7 @@ static void print_file_extent_item(struct extent_buffer *eb,
int slot,
struct btrfs_file_extent_item *fi)
{
- int extent_type = btrfs_file_extent_type(eb, fi);
+ unsigned char extent_type = btrfs_file_extent_type(eb, fi);
char compress_str[16];
compress_type_to_str(btrfs_file_extent_compression(eb, fi),