From: Peng Tao Date: Tue, 3 Dec 2013 14:42:05 +0000 (+0800) Subject: staging/lustre/llite: fix used uninitialized warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4b406dc43af155715ad6bfd72d742db7d9c01ac;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging/lustre/llite: fix used uninitialized warning Got below warning when building with sparc: drivers/staging/lustre/lustre/llite/file.c: In function 'll_file_aio_write': drivers/staging/lustre/lustre/llite/file.c:1247:9: warning: 'count' may be used uninitialized in this function [-Wuninitialized] drivers/staging/lustre/lustre/llite/file.c: In function 'll_file_aio_read': drivers/staging/lustre/lustre/llite/file.c:1188:9: warning: 'count' may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Peng Tao Signed-off-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index c1261357fd40..8f03eb0d2ff3 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1185,7 +1185,7 @@ static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov, { struct lu_env *env; struct vvp_io_args *args; - size_t count; + size_t count = 0; ssize_t result; int refcheck; @@ -1244,7 +1244,7 @@ static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov, { struct lu_env *env; struct vvp_io_args *args; - size_t count; + size_t count = 0; ssize_t result; int refcheck;