# [PATCH] Sparse fix for builtin-diff

2 messages from 2006-05-07 to 2006-05-07. Participants: Peter Hagervall, Junio C Hamano.
Thread: https://gitlist.dev/t/4088

## Peter Hagervall, 2006-05-07 14:50

Subject: [PATCH] Sparse fix for builtin-diff
Message-ID: <20060507145046.GA24882@peppar.cs.umu.se>
URL: https://gitlist.dev/e/20060507145046.GA24882%40peppar.cs.umu.se

```
You gotta love sparse:

builtin-diff.c:88:4: error: Just how const do you want this type to be?

Signed-off-by: Peter Hagervall <hager@cs.umu.se>
---

 builtin-diff.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/builtin-diff.c b/builtin-diff.c
index 636edbf..d3ac581 100644
--- a/builtin-diff.c
+++ b/builtin-diff.c
@@ -84,8 +84,7 @@ static void stuff_change(struct diff_opt
 
 	if (opt->reverse_diff) {
 		unsigned tmp;
-		const
-			const unsigned char *tmp_u;
+		const unsigned char *tmp_u;
 		const char *tmp_c;
 		tmp = old_mode; old_mode = new_mode; new_mode = tmp;
 		tmp_u = old_sha1; old_sha1 = new_sha1; new_sha1 = tmp_u;

```

## Junio C Hamano, 2006-05-07 20:43

Subject: Re: [PATCH] Sparse fix for builtin-diff
Message-ID: <7vpsiplg5t.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vpsiplg5t.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <20060507145046.GA24882@peppar.cs.umu.se>

```
Peter Hagervall <hager@cs.umu.se> writes:

> You gotta love sparse:
>
> builtin-diff.c:88:4: error: Just how const do you want this type to be?

LOL.

> -		const
> -			const unsigned char *tmp_u;
> +		const unsigned char *tmp_u;

I wondered how this bit snuck in, but it was like that
from the beginning, my bad.

Thanks.

```
