From patchwork Wed Oct 10 13:04:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 1573591 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 2A4E840135 for ; Wed, 10 Oct 2012 13:07:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F31C39EB22 for ; Wed, 10 Oct 2012 06:07:14 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 00A4D9E949 for ; Wed, 10 Oct 2012 06:04:53 -0700 (PDT) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 10 Oct 2012 06:04:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.80,564,1344236400"; d="scan'208";a="202780242" Received: from ideak-desk.fi.intel.com (HELO localhost) ([10.237.72.98]) by azsmga001.ch.intel.com with ESMTP; 10 Oct 2012 06:04:52 -0700 From: Imre Deak To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Oct 2012 16:04:40 +0300 Message-Id: <1349874285-31536-4-git-send-email-imre.deak@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1349874285-31536-1-git-send-email-imre.deak@intel.com> References: <1349874285-31536-1-git-send-email-imre.deak@intel.com> Subject: [Intel-gfx] [PATCH 3/8] fix warn in intel_reg_snapshot: ignoring return value of 'write' X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Signed-off-by: Imre Deak --- tools/intel_reg_snapshot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/intel_reg_snapshot.c b/tools/intel_reg_snapshot.c index 83e76e5..9c5fa83 100644 --- a/tools/intel_reg_snapshot.c +++ b/tools/intel_reg_snapshot.c @@ -25,6 +25,7 @@ */ #include +#include #include "intel_gpu_tools.h" int main(int argc, char** argv) @@ -32,6 +33,7 @@ int main(int argc, char** argv) struct pci_device *pci_dev; uint32_t devid; int mmio_bar; + int ret; pci_dev = intel_get_pci_device(); devid = pci_dev->device_id; @@ -42,7 +44,8 @@ int main(int argc, char** argv) else mmio_bar = 0; - write(1, mmio, pci_dev->regions[mmio_bar].size); + ret = write(1, mmio, pci_dev->regions[mmio_bar].size); + assert(ret > 0); return 0; }