summaryrefslogtreecommitdiff
path: root/send-utils.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2014-02-26 16:23:08 +0800
committerChris Mason <clm@fb.com>2014-03-21 06:23:29 -0700
commitd98a5ffe6f33d4039bf2f60dcd1fc121771d7cbc (patch)
tree2a81fded6c3c46ef291189dbdd30a526adb519fa /send-utils.c
parent41d6c3c265d40fc133894a7aaa4355efb02f75e1 (diff)
btrfs-progs: Init root_item to avoid gcc 4.8.2 warning
When using gcc 4.8.2, -Wmaybe-uninitialized will report root_item may be used uninitialized. Since root_item_valid variant is used to determine the root_item valid, it's a false alert and to avoid the warning, just init it on allocation. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'send-utils.c')
-rw-r--r--send-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/send-utils.c b/send-utils.c
index 8d4f46e3..71b6ec15 100644
--- a/send-utils.c
+++ b/send-utils.c
@@ -538,7 +538,7 @@ int subvol_uuid_search_init(int mnt_fd, struct subvol_uuid_search *s)
struct btrfs_ioctl_search_key *sk = &args.key;
struct btrfs_ioctl_search_header *sh;
struct btrfs_root_item *root_item_ptr;
- struct btrfs_root_item root_item;
+ struct btrfs_root_item root_item = {};
struct subvol_info *si = NULL;
int root_item_valid = 0;
unsigned long off = 0;