From: Junio C Hamano <gitster@pobox.com>
To: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: [RFC][PATCH 10/10] Sparse: fix a "symbol 'weak_match' shadows an earlier one" warning
Date: Sat, 09 Jun 2007 01:07:28 -0700 [thread overview]
Message-ID: <7vr6olh7pb.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <4669D7BC.3060607@ramsay1.demon.co.uk> (Ramsay Jones's message of "Fri, 08 Jun 2007 23:27:08 +0100")
Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
> connect.c | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/connect.c b/connect.c
> index da89c9c..d4051dd 100644
> --- a/connect.c
> +++ b/connect.c
> @@ -179,7 +179,6 @@ static int count_refspec_match(const char *pattern,
> for (weak_match = match = 0; refs; refs = refs->next) {
> char *name = refs->name;
> int namelen = strlen(name);
> - int weak_match;
>
> if (namelen < patlen ||
> memcmp(name + namelen - patlen, pattern, patlen))
This one is an obvious bug. Essentially, it makes weak matches
ignored. Unfortunately this has been hiding a larger bug in the
caller of this function. I am refactoring the mess right now.
next prev parent reply other threads:[~2007-06-09 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-08 22:27 [RFC][PATCH 10/10] Sparse: fix a "symbol 'weak_match' shadows an earlier one" warning Ramsay Jones
2007-06-09 8:07 ` Junio C Hamano [this message]
2007-06-12 17:43 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vr6olh7pb.fsf@assigned-by-dhcp.cox.net \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=ramsay@ramsay1.demon.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).