* [PATCH] Btrfs: fix compiler warning in file.c
@ 2011-03-30 0:57 Tsutomu Itoh
0 siblings, 0 replies; only message in thread
From: Tsutomu Itoh @ 2011-03-30 0:57 UTC (permalink / raw)
To: Linux Btrfs; +Cc: Chris Mason
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>
---
fs/btrfs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -urNp linux-2.6.39-rc1/fs/btrfs/file.c linux-2.6.39-rc1.new/fs/btrfs/file.c
--- linux-2.6.39-rc1/fs/btrfs/file.c 2011-03-30 04:09:47.000000000 +0900
+++ linux-2.6.39-rc1.new/fs/btrfs/file.c 2011-03-30 09:41:49.000000000 +0900
@@ -906,7 +906,7 @@ static noinline ssize_t __btrfs_buffered
unsigned long last_index;
size_t num_written = 0;
int nrptrs;
- int ret;
+ int ret = 0;
nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-03-30 0:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-30 0:57 [PATCH] Btrfs: fix compiler warning in file.c Tsutomu Itoh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).