Skip to content

Commit c914923

Browse files
Tsutomu Itohchrismason-xx
authored andcommitted
Btrfs: fix compiler warning in file.c
While compiling Btrfs, I got following messages: CC [M] fs/btrfs/file.o fs/btrfs/file.c: In function '__btrfs_buffered_write': fs/btrfs/file.c:909: warning: 'ret' may be used uninitialized in this function CC [M] fs/btrfs/tree-defrag.o This patch fixes compiler warning. Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
1 parent d9d0487 commit c914923

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
906906
unsigned long last_index;
907907
size_t num_written = 0;
908908
int nrptrs;
909-
int ret;
909+
int ret = 0;
910910

911911
nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
912912
PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /

0 commit comments

Comments
 (0)