From: Olaf Hering Subject: [PATCH 05 of 18] tools/blktap2: fix build errors caused by Werror in vhd_journal_write_entry Date: Fri, 30 Mar 2012 10:25:22 +0200 Message-ID: <91286869cde3e05f3eff.1333095922@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 List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Olaf Hering # Date 1333046230 -7200 # Node ID 91286869cde3e05f3eff1b1a7f8bea9d11452792 # Parent 9abe0baa60fb8773707118856c300c1dd478aaf2 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. Signed-off-by: Olaf Hering diff -r 9abe0baa60fb -r 91286869cde3 tools/blktap2/vhd/lib/libvhd-journal.c --- a/tools/blktap2/vhd/lib/libvhd-journal.c +++ b/tools/blktap2/vhd/lib/libvhd-journal.c @@ -330,11 +330,7 @@ vhd_journal_write_entry(vhd_journal_t *j memcpy(&e, entry, sizeof(vhd_journal_entry_t)); vhd_journal_entry_out(&e); - err = vhd_journal_write(j, &e, sizeof(vhd_journal_entry_t)); - if (err) - err; - - return 0; + return vhd_journal_write(j, &e, sizeof(vhd_journal_entry_t)); } static int