From: Chris Mason Date: Fri, 2 May 2008 19:05:11 +0000 (-0400) Subject: Fix compiler warning in volumes.c X-Git-Tag: upstream/0.20.rc1~266 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a73efb7d173ba1be2b98dcac9021802c3112269;p=platform%2Fupstream%2Fbtrfs-progs.git Fix compiler warning in volumes.c --- diff --git a/btrfsck.c b/btrfsck.c index 5a89ac6..174c7f9 100644 --- a/btrfsck.c +++ b/btrfsck.c @@ -606,6 +606,9 @@ static int run_next_block(struct btrfs_root *root, data_bytes_allocated += btrfs_file_extent_disk_num_bytes(buf, fi); + if (data_bytes_allocated < root->sectorsize) { + abort(); + } data_bytes_referenced += btrfs_file_extent_num_bytes(buf, fi); ret = add_extent_rec(extent_cache, NULL, bytenr, diff --git a/volumes.c b/volumes.c index 2d04f64..c94f73c 100644 --- a/volumes.c +++ b/volumes.c @@ -478,7 +478,7 @@ int btrfs_add_device(struct btrfs_trans_handle *trans, struct extent_buffer *leaf; struct btrfs_key key; unsigned long ptr; - u64 free_devid; + u64 free_devid = 0; root = root->fs_info->chunk_root;