Skip to content

Commit

Permalink
[PATCH] Fix two ext[23] uninitialized warnings
Browse files Browse the repository at this point in the history
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: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Andreas Gruenbacher authored and Linus Torvalds committed Feb 3, 2006
1 parent 9d923a0 commit dfa0859
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/ext2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
struct ext2_inode_info *ei = EXT2_I(inode);
int name_index;
void *value = NULL;
size_t size;
size_t size = 0;
int error;

if (S_ISLNK(inode->i_mode))
Expand Down
2 changes: 1 addition & 1 deletion fs/ext3/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
struct ext3_inode_info *ei = EXT3_I(inode);
int name_index;
void *value = NULL;
size_t size;
size_t size = 0;
int error;

if (S_ISLNK(inode->i_mode))
Expand Down

0 comments on commit dfa0859

Please sign in to comment.