simple compile time warning fixes. cmds-check.c: In function ‘del_file_extent_hole’: cmds-check.c:289: warning: ‘prev.len’ may be used uninitialized in this function cmds-check.c:289: warning: ‘prev.start’ may be used uninitialized in this function cmds-check.c:290: warning: ‘next.len’ may be used uninitialized in this function cmds-check.c:290: warning: ‘next.start’ may be used uninitialized in this function btrfs-calc-size.c: In function ‘print_seek_histogram’: btrfs-calc-size.c:221: warning: ‘group_start’ may be used uninitialized in this function btrfs-calc-size.c:223: warning: ‘group_end’ may be used uninitialized in this function Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx> --- btrfs-calc-size.c | 4 ++-- cmds-check.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/btrfs-calc-size.c b/btrfs-calc-size.c index 1372084..88f92e1 100644 --- a/btrfs-calc-size.c +++ b/btrfs-calc-size.c @@ -218,9 +218,9 @@ static void print_seek_histogram(struct root_stats *stat) struct rb_node *n = rb_first(&stat->seek_root); struct seek *seek; u64 tick_interval; - u64 group_start; + u64 group_start = 0; u64 group_count = 0; - u64 group_end; + u64 group_end = 0; u64 i; u64 max_seek = stat->max_seek_len; int digits = 1; diff --git a/cmds-check.c b/cmds-check.c index ed8c698..de22185 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -293,6 +293,9 @@ static int del_file_extent_hole(struct rb_root *holes, int have_next = 0; int ret = 0; + memset(&prev, 0, sizeof(struct file_extent_hole)); + memset(&next, 0, sizeof(struct file_extent_hole)); + tmp.start = start; tmp.len = len; node = rb_search(holes, &tmp, compare_hole_range, NULL); -- 2.0.0.153.g79dcccc -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
