threads / patch / 4088

patchSparse fix for builtin-diff

Subject: [PATCH] Sparse fix for builtin-diff

## tl;dr

2 messages between May 7, 2006 and May 7, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Peter Hagervall· May 7, 2006, 14:50 UTC · lore
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(-)
Show changes to builtin-diff.c +1 −2
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· May 7, 2006, 20:43 UTC · re: Peter Hagervall · lore

Re: [PATCH] Sparse fix for builtin-diff

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.

← back to recent threads