提交 dfa08592 编写于 作者: A Andreas Gruenbacher 提交者: Linus Torvalds

[PATCH] Fix two ext[23] uninitialized warnings

There is a code path that passed size to ext2_xattr_set
(ext3_xattr_set_handle) before initializing it.  The callees don't use the
value in that case, but gcc cannot tell.  Always initialize size to get rid
of the warnings.
Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 9d923a06
...@@ -220,7 +220,7 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl) ...@@ -220,7 +220,7 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
struct ext2_inode_info *ei = EXT2_I(inode); struct ext2_inode_info *ei = EXT2_I(inode);
int name_index; int name_index;
void *value = NULL; void *value = NULL;
size_t size; size_t size = 0;
int error; int error;
if (S_ISLNK(inode->i_mode)) if (S_ISLNK(inode->i_mode))
......
...@@ -226,7 +226,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type, ...@@ -226,7 +226,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
struct ext3_inode_info *ei = EXT3_I(inode); struct ext3_inode_info *ei = EXT3_I(inode);
int name_index; int name_index;
void *value = NULL; void *value = NULL;
size_t size; size_t size = 0;
int error; int error;
if (S_ISLNK(inode->i_mode)) if (S_ISLNK(inode->i_mode))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册