From: Qu Wenruo Date: Wed, 26 Feb 2014 08:23:08 +0000 (+0800) Subject: btrfs-progs: Init root_item to avoid gcc 4.8.2 warning X-Git-Tag: upstream/4.16.1~2936 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d98a5ffe6f33d4039bf2f60dcd1fc121771d7cbc;p=platform%2Fupstream%2Fbtrfs-progs.git 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 Signed-off-by: David Sterba Signed-off-by: Chris Mason --- diff --git a/send-utils.c b/send-utils.c index 8d4f46e..71b6ec1 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;