Jeff Mahoney
2008-Feb-06 14:15 UTC
[Btrfs-devel] [PATCH 2/4] btrfs: silence warning in btrfs_mkdir()
-----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@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-----
Jens Axboe
2008-Feb-07 00:22 UTC
[Btrfs-devel] [PATCH 2/4] btrfs: silence warning in btrfs_mkdir()
On Wed, Feb 06 2008, Jeff Mahoney wrote:> -----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.There's uninitialized_var() for that purpose :-) -- Jens Axboe