From 3b4e2d61961f7308885cce98bfecdf07d6c0ed01 Mon Sep 17 00:00:00 2001 From: Miao Xie Date: Fri, 10 Aug 2012 10:46:16 +0800 Subject: Btrfs-progs: fix several complie warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixed the following warning: cmds-send.c:464:6: warning: ‘ret' may be used uninitialized in this function [-Wuninitialized] crc32c.c:121:1: warning: control reaches end of non-void function [-Wreturn-type] send-utils.c:69:11: warning: ‘comp' may be used uninitialized in this function [-Wuninitialized] send-utils.c:126:6: warning: ‘comp' may be used uninitialized in this function [-Wuninitialized] send-utils.c:99:22: warning: ‘entry' may be used uninitialized in this function [-Wuninitialized] btrfs.c:261:2: warning: implicit declaration of function ‘crc32c_optimization_init' [-Wimplicit-function-declaration] btrfs.c:105:2: warning: ‘cmd' may be used uninitialized in this function [-Wuninitialized] restore.c:435:12: warning: ignoring return value of ‘ftruncate', declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Miao Xie --- cmds-send.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmds-send.c') diff --git a/cmds-send.c b/cmds-send.c index 41ea523..9b47e70 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -495,6 +495,7 @@ int cmd_send_start(int argc, char **argv) subvol = realpath(argv[optind], NULL); if (!subvol) { + ret = -errno; fprintf(stderr, "ERROR: unable to resolve %s\n", argv[optind]); goto out; } @@ -519,6 +520,7 @@ int cmd_send_start(int argc, char **argv) for (i = optind; i < argc; i++) { subvol = realpath(argv[i], NULL); if (!subvol) { + ret = -errno; fprintf(stderr, "ERROR: unable to resolve %s\n", argv[i]); goto out; } -- cgit v1.2.1