[Btrfs-devel] [PATCH 2/4] btrfs: silence warning in btrfs_mkdir()

Jeff Mahoney jeffm at suse.com
Wed Feb 6 14:14:45 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 Gcc complains that inode can be used uninitialized, but it can't due
 to the drop_on_err check. This silences the complaint.

Signed-off-by: Jeff Mahoney <jeffm at suse.com>
- ---
 inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

- --- a/inode.c	2008-02-06 11:37:39.000000000 -0500
+++ b/inode.c	2008-02-06 15:15:02.000000000 -0500
@@ -1820,7 +1820,7 @@ fail:
 
 static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
 {
- -	struct inode *inode;
+	struct inode *inode = NULL;
 	struct btrfs_trans_handle *trans;
 	struct btrfs_root *root = BTRFS_I(dir)->root;
 	int err = 0;

- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHqjFVLPWxlyuTD7IRAn90AJ4y2fIadY3hTkZgclop58++x/OiWgCgmrn6
3mBF5kLonkbKqJxuYZCNavc=
=WwMG
-----END PGP SIGNATURE-----



More information about the Btrfs-devel mailing list