From patchwork Tue Sep 20 17:08:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Franciosi X-Patchwork-Id: 9343107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89477607D0 for ; Wed, 21 Sep 2016 09:15:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 768BB2A3F1 for ; Wed, 21 Sep 2016 09:15:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 688032A3F5; Wed, 21 Sep 2016 09:15:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E50BA2A3F1 for ; Wed, 21 Sep 2016 09:15:22 +0000 (UTC) Received: from localhost ([::1]:40998 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmdcf-0001vL-CM for patchwork-qemu-devel@patchwork.kernel.org; Wed, 21 Sep 2016 05:15:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37285) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmdcM-0001s9-SA for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bmdcJ-0005El-G7 for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:15:02 -0400 Received: from [62.254.189.133] (port=35116 helo=centos.localdomain) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bmdcJ-0004w8-8E for qemu-devel@nongnu.org; Wed, 21 Sep 2016 05:14:59 -0400 Received: by centos.localdomain (Postfix, from userid 500) id 367AD9FBDC; Tue, 20 Sep 2016 18:09:18 +0100 (BST) From: Felipe Franciosi To: Pavel Dovgalyuk , Eric Blake Date: Tue, 20 Sep 2016 18:08:46 +0100 Message-Id: <1474391326-871-1-git-send-email-felipe@nutanix.com> X-Mailer: git-send-email 1.9.5 X-detected-operating-system: by eggs.gnu.org: Mac OS X [generic] X-Received-From: 62.254.189.133 Subject: [Qemu-devel] [PATCH] replay: Fix build with -Werror=unused-result X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Felipe Franciosi Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP If compiling with -Werror=unused-result, replay-internal.c won't build due to a call to fwrite() where the returned value is ignored. A simple cast to (void) is not sufficient on recent GCCs, so this fixes it. Signed-off-by: Felipe Franciosi --- replay/replay-internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/replay/replay-internal.c b/replay/replay-internal.c index 5835e8d..6978d76 100644 --- a/replay/replay-internal.c +++ b/replay/replay-internal.c @@ -65,7 +65,7 @@ void replay_put_array(const uint8_t *buf, size_t size) { if (replay_file) { replay_put_dword(size); - fwrite(buf, 1, size, replay_file); + (void)(fwrite(buf, 1, size, replay_file)+1); } }