tools/blktap2: fix build errors caused by Werror in
authorOlaf Hering <olaf@aepfle.de>
Thu, 10 May 2012 10:19:05 +0000 (11:19 +0100)
committerOlaf Hering <olaf@aepfle.de>
Thu, 10 May 2012 10:19:05 +0000 (11:19 +0100)
vhd_journal_write_entry

-O2 -Wall -Werror triggers these warnings:

libvhd-journal.c: In function 'vhd_journal_write_entry':
libvhd-journal.c:335: warning: statement with no effect

Really return the error from vhd_journal_write() to caller.

v2:
 - simplify the patch by just adding the missing return statement

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Keir Fraser <keir@xen.org>
tools/blktap2/vhd/lib/libvhd-journal.c

index 7edd182dc36811728df1cbd90c88b253623992a5..26e26e7c360e608632a6b0bfdf0ea61a4eadc41d 100644 (file)
@@ -332,7 +332,7 @@ vhd_journal_write_entry(vhd_journal_t *j, vhd_journal_entry_t *entry)
 
        err = vhd_journal_write(j, &e, sizeof(vhd_journal_entry_t));
        if (err)
-               err;
+               return err;
 
        return 0;
 }