* [RFC][PATCH 10/10] Sparse: fix a "symbol 'weak_match' shadows an earlier one" warning
@ 2007-06-08 22:27 Ramsay Jones
2007-06-09 8:07 ` Junio C Hamano
0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2007-06-08 22:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: GIT Mailing-list
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))
--
1.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC][PATCH 10/10] Sparse: fix a "symbol 'weak_match' shadows an earlier one" warning
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
2007-06-12 17:43 ` Ramsay Jones
0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2007-06-09 8:07 UTC (permalink / raw)
To: Ramsay Jones; +Cc: GIT Mailing-list
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC][PATCH 10/10] Sparse: fix a "symbol 'weak_match' shadows an earlier one" warning
2007-06-09 8:07 ` Junio C Hamano
@ 2007-06-12 17:43 ` Ramsay Jones
0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2007-06-12 17:43 UTC (permalink / raw)
To: Junio C Hamano; +Cc: GIT Mailing-list
Junio C Hamano wrote:
> 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.
Indeed ;-)
Also, I'm guessing it does not bring your machine down like a house of cards.
... 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.
>
Great. Hopefully it will also address the cygwin issue.
ATB
Ramsay Jones
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-06-12 17:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-06-12 17:43 ` Ramsay Jones
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).