From patchwork Mon Nov 11 17:48:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Romanick X-Patchwork-Id: 3168921 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9B4F59F39E for ; Mon, 11 Nov 2013 17:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C85320386 for ; Mon, 11 Nov 2013 17:48:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ED9D02025B for ; Mon, 11 Nov 2013 17:48:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C2B3FA7FD; Mon, 11 Nov 2013 09:48:44 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from expn.cat.pdx.edu (expn.cat.pdx.edu [131.252.208.110]) by gabe.freedesktop.org (Postfix) with ESMTP id 9A013FA7FD; Mon, 11 Nov 2013 09:48:42 -0800 (PST) Received: from idr ([127.0.0.1])(authenticated bits=0) by expn.cat.pdx.edu (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id rABHmbLw026715 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 11 Nov 2013 09:48:41 -0800 From: "Ian Romanick" To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Mon, 11 Nov 2013 09:48:27 -0800 Message-Id: <1384192107-14314-2-git-send-email-idr@freedesktop.org> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1384192107-14314-1-git-send-email-idr@freedesktop.org> References: <1384192107-14314-1-git-send-email-idr@freedesktop.org> X-Virus-Scanned: clamav-milter 0.97.8 at expn X-Virus-Status: Clean Cc: Ian Romanick Subject: [Intel-gfx] [PATCH 2/2] intel: Silence warning in non-Valgrind build 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@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ian Romanick Previously GCC was squaking about: intel_bufmgr_gem.c: In function 'drm_intel_gem_bo_map_unsynchronized': intel_bufmgr_gem.c:1325:20: warning: unused variable 'bo_gem' [-Wunused-variable] Wrapping with VG(); replaced that warning with: intel_bufmgr_gem.c: In function 'drm_intel_gem_bo_map_unsynchronized': intel_bufmgr_gem.c:1326:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Which, looking at the definition of the VG macro, seems a bit weird. It's caused by the dangling ";" left from the empty macro. Signed-off-by: Ian Romanick Cc: Chia-I Wu --- intel/intel_bufmgr_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 5b64a7f..dbadc52 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -1322,7 +1322,9 @@ int drm_intel_gem_bo_map_gtt(drm_intel_bo *bo) int drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo) { drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; +#ifdef HAVE_VALGRIND drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; +#endif int ret; /* If the CPU cache isn't coherent with the GTT, then use a