All of lore.kernel.org
 help / color / mirror / Atom feed
* [Patch 2/3] cldcli: suppress warnings from -Wshadow
@ 2009-08-04  1:54 Pete Zaitcev
  2009-08-04  2:11 ` Jeff Garzik
  0 siblings, 1 reply; 3+ messages in thread
From: Pete Zaitcev @ 2009-08-04  1:54 UTC (permalink / raw)
  To: Jeff Garzik, Project Hail List

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>

diff --git a/tools/cldcli.c b/tools/cldcli.c
index bb5c4cc..90ae601 100644
--- a/tools/cldcli.c
+++ b/tools/cldcli.c
@@ -437,12 +437,12 @@ static bool cld_p_timer_ctl(void *private, bool add,
 static int cld_p_pkt_send(void *priv, const void *addr, size_t addrlen,
 			       const void *buf, size_t buflen)
 {
-	struct cldc_udp *udp = priv;
-	return cldc_udp_pkt_send(udp, addr, addrlen, buf, buflen);
+	struct cldc_udp *udpp = priv;
+	return cldc_udp_pkt_send(udpp, addr, addrlen, buf, buflen);
 }
 
 static void cld_p_event(void *private, struct cldc_session *sess,
-			struct cldc_fh *fh, uint32_t what)
+			struct cldc_fh *fhp, uint32_t what)
 {
 	fprintf(stderr, "FIXME: event\n");
 }

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

* Re: [Patch 2/3] cldcli: suppress warnings from -Wshadow
  2009-08-04  1:54 [Patch 2/3] cldcli: suppress warnings from -Wshadow Pete Zaitcev
@ 2009-08-04  2:11 ` Jeff Garzik
  2009-08-04  4:11   ` Pete Zaitcev
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2009-08-04  2:11 UTC (permalink / raw)
  To: Pete Zaitcev; +Cc: Project Hail List

Pete Zaitcev wrote:
> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
> 
> diff --git a/tools/cldcli.c b/tools/cldcli.c
> index bb5c4cc..90ae601 100644
> --- a/tools/cldcli.c
> +++ b/tools/cldcli.c
> @@ -437,12 +437,12 @@ static bool cld_p_timer_ctl(void *private, bool add,
>  static int cld_p_pkt_send(void *priv, const void *addr, size_t addrlen,
>  			       const void *buf, size_t buflen)
>  {
> -	struct cldc_udp *udp = priv;
> -	return cldc_udp_pkt_send(udp, addr, addrlen, buf, buflen);
> +	struct cldc_udp *udpp = priv;
> +	return cldc_udp_pkt_send(udpp, addr, addrlen, buf, buflen);
>  }
>  
>  static void cld_p_event(void *private, struct cldc_session *sess,
> -			struct cldc_fh *fh, uint32_t what)
> +			struct cldc_fh *fhp, uint32_t what)
>  {
>  	fprintf(stderr, "FIXME: event\n");

I think the root cause is poorly named globals, so instead of applying 
this patch, I added a "thr_" prefix to the globals 'fh' and 'udp'.

I also fixed the other -Wshadow warnings as well, even though they were 
largely harmless (variable name matched a system function name).

	Jeff




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

* Re: [Patch 2/3] cldcli: suppress warnings from -Wshadow
  2009-08-04  2:11 ` Jeff Garzik
@ 2009-08-04  4:11   ` Pete Zaitcev
  0 siblings, 0 replies; 3+ messages in thread
From: Pete Zaitcev @ 2009-08-04  4:11 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Project Hail List

On Mon, 03 Aug 2009 22:11:06 -0400, Jeff Garzik <jeff@garzik.org> wrote:

> I think the root cause is poorly named globals, so instead of applying 
> this patch, I added a "thr_" prefix to the globals 'fh' and 'udp'.
> 
> I also fixed the other -Wshadow warnings as well, even though they were 
> largely harmless (variable name matched a system function name).

By all means, thanks.

-- Pete

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

end of thread, other threads:[~2009-08-04  4:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04  1:54 [Patch 2/3] cldcli: suppress warnings from -Wshadow Pete Zaitcev
2009-08-04  2:11 ` Jeff Garzik
2009-08-04  4:11   ` Pete Zaitcev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.