public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for infiniband-diags] get_lid_from_name(): Remove an unused variable
@ 2013-08-18  8:57 Bart Van Assche
       [not found] ` <52108C63.9080101-HInyCGIudOg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2013-08-18  8:57 UTC (permalink / raw)
  To: Ira Weiny; +Cc: linux-rdma

This patch avoids that the following compiler warning is triggered:

src/saquery.c:869:18: warning: variable 'p_ni' set but not used [-Wunused-but-set-variable]

Signed-off-by: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
---
 src/saquery.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/src/saquery.c b/src/saquery.c
index e4fbc87..d6fd017 100644
--- a/src/saquery.c
+++ b/src/saquery.c
@@ -866,7 +866,6 @@ static int get_and_dump_all_records(struct sa_handle * h, uint16_t attr_id,
 static int get_lid_from_name(struct sa_handle * h, const char *name, uint16_t * lid)
 {
 	ib_node_record_t *node_record = NULL;
-	ib_node_info_t *p_ni = NULL;
 	unsigned i;
 	int ret;
 	struct sa_query_result result;
@@ -878,7 +877,6 @@ static int get_lid_from_name(struct sa_handle * h, const char *name, uint16_t *
 	ret = ENONET;
 	for (i = 0; i < result.result_cnt; i++) {
 		node_record = sa_get_query_rec(result.p_result_madw, i);
-		p_ni = &(node_record->node_info);
 		if (name
 		    && strncmp(name, (char *)node_record->node_desc.description,
 			       sizeof(node_record->node_desc.description)) ==
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH for infiniband-diags] get_lid_from_name(): Remove an unused variable
       [not found] ` <52108C63.9080101-HInyCGIudOg@public.gmane.org>
@ 2013-08-19  6:25   ` Ira Weiny
  0 siblings, 0 replies; 2+ messages in thread
From: Ira Weiny @ 2013-08-19  6:25 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: linux-rdma

On Sun, 18 Aug 2013 10:57:07 +0200
Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org> wrote:

> This patch avoids that the following compiler warning is triggered:
> 
> src/saquery.c:869:18: warning: variable 'p_ni' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>

Thanks applied,
Ira

> ---
>  src/saquery.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/saquery.c b/src/saquery.c
> index e4fbc87..d6fd017 100644
> --- a/src/saquery.c
> +++ b/src/saquery.c
> @@ -866,7 +866,6 @@ static int get_and_dump_all_records(struct sa_handle * h, uint16_t attr_id,
>  static int get_lid_from_name(struct sa_handle * h, const char *name, uint16_t * lid)
>  {
>  	ib_node_record_t *node_record = NULL;
> -	ib_node_info_t *p_ni = NULL;
>  	unsigned i;
>  	int ret;
>  	struct sa_query_result result;
> @@ -878,7 +877,6 @@ static int get_lid_from_name(struct sa_handle * h, const char *name, uint16_t *
>  	ret = ENONET;
>  	for (i = 0; i < result.result_cnt; i++) {
>  		node_record = sa_get_query_rec(result.p_result_madw, i);
> -		p_ni = &(node_record->node_info);
>  		if (name
>  		    && strncmp(name, (char *)node_record->node_desc.description,
>  			       sizeof(node_record->node_desc.description)) ==
> -- 
> 1.7.10.4
> 


-- 
Ira Weiny <ira.weiny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-19  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18  8:57 [PATCH for infiniband-diags] get_lid_from_name(): Remove an unused variable Bart Van Assche
     [not found] ` <52108C63.9080101-HInyCGIudOg@public.gmane.org>
2013-08-19  6:25   ` Ira Weiny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox