From patchwork Wed May 18 17:44:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 9121581 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 CC8769F1D3 for ; Wed, 18 May 2016 17:44:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06F792034B for ; Wed, 18 May 2016 17:44:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 30E9220340 for ; Wed, 18 May 2016 17:44:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753241AbcERRoX (ORCPT ); Wed, 18 May 2016 13:44:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39450 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753207AbcERRoW (ORCPT ); Wed, 18 May 2016 13:44:22 -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 62B6C85542; Wed, 18 May 2016 17:44:22 +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 u4IHiCNw017617; Wed, 18 May 2016 13:44:21 -0400 From: Jarod Wilson To: linux-rdma@vger.kernel.org Cc: Jarod Wilson , Gil Rockah Subject: [PATCH perftest] Fix unused variable warnings for pl_index, sg_l Date: Wed, 18 May 2016 13:44:08 -0400 Message-Id: <1463593448-30864-3-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.28]); Wed, 18 May 2016 17:44:22 +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. CC: Gil Rockah 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);