From: Andreas Gruenbacher Date: Fri, 3 Feb 2006 11:04:13 +0000 (-0800) Subject: [PATCH] Fix two ext[23] uninitialized warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dfa08592ca0440d793ecc8dfc6277dd2aa4b8dda;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 35acc43b897f..da52b4a5db64 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c @@ -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)) diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c index 47a9da2dfb4f..0d21d558b87a 100644 --- a/fs/ext3/acl.c +++ b/fs/ext3/acl.c @@ -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))