From: Olaf Hering Subject: [PATCH 06 of 18] tools/blktap2: fix build errors caused by Werror in vhd_journal_write_entry Date: Mon, 02 Apr 2012 22:15:29 +0200 Message-ID: <8d134408ddf233c6fe3a.1333397729@probook.site> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Olaf Hering # Date 1333397533 -7200 # Node ID 8d134408ddf233c6fe3a452b9b9f0780f91170e6 # Parent cbdba2284f36dba539b7f5a0cded571c96f2bc4c tools/blktap2: fix build errors caused by Werror in 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 diff -r cbdba2284f36 -r 8d134408ddf2 tools/blktap2/vhd/lib/libvhd-journal.c --- a/tools/blktap2/vhd/lib/libvhd-journal.c +++ b/tools/blktap2/vhd/lib/libvhd-journal.c @@ -332,7 +332,7 @@ vhd_journal_write_entry(vhd_journal_t *j err = vhd_journal_write(j, &e, sizeof(vhd_journal_entry_t)); if (err) - err; + return err; return 0; }