From patchwork Wed May 18 17:08:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 9121511 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E07B9F30C for ; Wed, 18 May 2016 17:08:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4608C2034B for ; Wed, 18 May 2016 17:08:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5EE8A201FE for ; Wed, 18 May 2016 17:08:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753342AbcERRIV (ORCPT ); Wed, 18 May 2016 13:08:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34902 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752772AbcERRIV (ORCPT ); Wed, 18 May 2016 13:08:21 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8F5C16F674 for ; Wed, 18 May 2016 17:08:20 +0000 (UTC) Received: from hp-dl360pgen8-07.khw.lab.eng.bos.redhat.com (hp-dl360pgen8-07.khw.lab.eng.bos.redhat.com [10.16.184.47]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4IH8JuI024031; Wed, 18 May 2016 13:08:20 -0400 From: Jarod Wilson To: linux-rdma@vger.kernel.org Cc: Jarod Wilson Subject: [PATCH] Fix unused variable warnings for pl_index, sg_l Date: Wed, 18 May 2016 13:08:18 -0400 Message-Id: <1463591298-30102-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 18 May 2016 17:08:20 +0000 (UTC) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 These variables will be unused if certain #define's aren't set, so wrap them with the same #ifdef's as the places they're used. Signed-off-by: Jarod Wilson --- src/perftest_resources.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/perftest_resources.c b/src/perftest_resources.c index 71a1541..4071989 100755 --- a/src/perftest_resources.c +++ b/src/perftest_resources.c @@ -2778,8 +2778,12 @@ int run_iter_bw(struct pingpong_context *ctx,struct perftest_parameters *user_pa int cpu_mhz = 0; int return_value = 0; int wc_id; + #ifdef HAVE_VERBS_EXP + #ifdef HAVE_ACCL_VERBS int pl_index; struct ibv_sge *sg_l; + #endif + #endif ALLOCATE(wc ,struct ibv_wc ,CTX_POLL_BATCH);