From patchwork Tue Jul 15 17:22:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Klausner X-Patchwork-Id: 4556591 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 828A6C0514 for ; Tue, 15 Jul 2014 17:23:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C384220172 for ; Tue, 15 Jul 2014 17:23:05 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D8BA020170 for ; Tue, 15 Jul 2014 17:23:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D3C26E171; Tue, 15 Jul 2014 10:23:02 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fep16.mx.upcmail.net (fep16.mx.upcmail.net [62.179.121.36]) by gabe.freedesktop.org (Postfix) with ESMTP id B06026E0B9 for ; Tue, 15 Jul 2014 10:23:00 -0700 (PDT) Received: from edge01.upcmail.net ([192.168.13.236]) by viefep16-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20140715172258.YUJS709.viefep16-int.chello.at@edge01.upcmail.net>; Tue, 15 Jul 2014 19:22:58 +0200 Received: from yt.nih.at ([213.47.1.69]) by edge01.upcmail.net with edge id ShNw1o01T1VKkul01hNx5S; Tue, 15 Jul 2014 19:22:58 +0200 X-SourceIP: 213.47.1.69 Received: by yt.nih.at (Postfix, from userid 1000) id CADDA2AC12E; Tue, 15 Jul 2014 19:23:00 +0200 (CEST) From: Thomas Klausner To: dri-devel@lists.freedesktop.org Subject: [PATCH:drm 2/4] Only define variable when it's used. Date: Tue, 15 Jul 2014 19:22:53 +0200 Message-Id: <1405444975-29236-2-git-send-email-wiz@NetBSD.org> X-Mailer: git-send-email 1.9.4 In-Reply-To: <1405444975-29236-1-git-send-email-wiz@NetBSD.org> References: <1405444975-29236-1-git-send-email-wiz@NetBSD.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Signed-off-by: Thomas Klausner --- intel/test_decode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intel/test_decode.c b/intel/test_decode.c index b710f34..f9127cf 100644 --- a/intel/test_decode.c +++ b/intel/test_decode.c @@ -90,7 +90,10 @@ compare_batch(struct drm_intel_decode *ctx, const char *batch_filename) { FILE *out = NULL; void *ptr, *ref_ptr, *batch_ptr; - size_t size, ref_size, batch_size; +#ifdef HAVE_OPEN_MEMSTREAM + size_t size; +#endif + size_t ref_size, batch_size; const char *ref_suffix = "-ref.txt"; char *ref_filename;