staging/lustre/llite: fix used uninitialized warning
authorPeng Tao <bergwolf@gmail.com>
Tue, 3 Dec 2013 14:42:05 +0000 (22:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Dec 2013 16:58:48 +0000 (08:58 -0800)
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 <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/file.c

index c1261357fd400bd7cde6b2fac3ed492c7e7514a5..8f03eb0d2ff343c69e81f74232c8c4d645adceda 100644 (file)
@@ -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;