Skip to content

Commit dfa0859

Browse files
Andreas GruenbacherLinus Torvalds
authored andcommitted
[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: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 9d923a0 commit dfa0859

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎fs/ext2/acl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
220220
struct ext2_inode_info *ei = EXT2_I(inode);
221221
int name_index;
222222
void *value = NULL;
223-
size_t size;
223+
size_t size = 0;
224224
int error;
225225

226226
if (S_ISLNK(inode->i_mode))

‎fs/ext3/acl.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ ext3_set_acl(handle_t *handle, struct inode *inode, int type,
226226
struct ext3_inode_info *ei = EXT3_I(inode);
227227
int name_index;
228228
void *value = NULL;
229-
size_t size;
229+
size_t size = 0;
230230
int error;
231231

232232
if (S_ISLNK(inode->i_mode))

0 commit comments

Comments
 (0)