Skip to contentSkip to conversation

Fix unused variable warnings for pl_index, sg_l

PATCH In review Jarod Wilson 2 participants 2 messages May 18, 2016 – May 22, 2016 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix unused variable warnings for pl_index, sg_l

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 <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
 src/perftest_resources.c | 4 ++++
 1 file changed, 4 insertions(+)
src/perftest_resources.c +4 -0
index 71a1541..4071989 100755
@@ -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);
 
Signature · 6 lines
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive

Thanks Jarod.
Will take a look at the patches

-----Original Message-----
From: Jarod Wilson [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:44 PM
To: [email protected]
Cc: Jarod Wilson <[email protected]>; Gil Rockah <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: [PATCH perftest] Fix unused variable warnings for pl_index, sg_l

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 <gilr-VPRAkNaXOzVWk0Htik3J/[email protected]>
---
 src/perftest_resources.c | 4 ++++
 1 file changed, 4 insertions(+)
src/perftest_resources.c +4 -0
@@ -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);
 

--
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html