From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Garzik Subject: Re: [Patch 2/3] cldcli: suppress warnings from -Wshadow Date: Mon, 03 Aug 2009 22:11:06 -0400 Message-ID: <4A7798BA.6010906@garzik.org> References: <20090803195428.075142a5@redhat.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090803195428.075142a5@redhat.com> Sender: hail-devel-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: Pete Zaitcev Cc: Project Hail List Pete Zaitcev wrote: > Signed-off-by: Pete Zaitcev > > 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