btrfs-progs: Tighten integer types in print-tree.
diff mbox

Message ID 20170710212909.31559-2-abuchbinder@google.com
State New
Headers show

Commit Message

Adam Buchbinder July 10, 2017, 9:29 p.m. UTC
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>
---
 print-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

David Sterba July 12, 2017, 10:26 p.m. UTC | #1
On Mon, Jul 10, 2017 at 02:29:09PM -0700, Adam Buchbinder wrote:
> 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>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/print-tree.c b/print-tree.c
index a0d3395..82d6572 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),