Fix unused variable warnings for pl_index, sg_l
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.
Signed-off-by Jarod Wilson <[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_paint 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
A message that is not in the archive (sent off-list or not yet received): 1463591298-30102-1-git-send-email-jarod-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Quoted 13 lines · Jarod Wilson
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 <[email protected]>--- src/perftest_resources.c | 4 ++++ 1 file changed, 4 insertions(+)src/perftest_resources.c +0
-0
src/perftest_resources.c int run_iter_bw(struct pingpong_context *ctx,struct perftest_parameters *user_pa · line 2782
Quoted 5 lines
src/perftest_resources.c +2
-0@@ -2778,8 +2778,12 @@ int run_iter_bw(struct pingpong_context *ctx,struct perftest_parameters *user_paint cpu_mhz =0 ;int return_value =0 ;int wc_id; +#ifdef HAVE_VERBS_EXP +#ifdef HAVE_ACCL_VERBS
Maybe "#if defined(HAVE_VERBS_EXP) && defined(HAVE_ACCL_VERBS)" will be better?
Anyway, it is the same.
Quoted 14 lines
src/perftest_resources.c +2
-0int 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