Skip to contentSkip to conversation

Sparse fix for builtin-diff

PATCH In review Peter Hagervall 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Sparse fix for builtin-diff

You gotta love sparse:

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

---

 builtin-diff.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
builtin-diff.c +1 -2
index 636edbf..d3ac581 100644
@@ -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;
#1 lore raw
Quoted 3 lines · Peter Hagervall

You gotta love sparse:

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

LOL.

builtin-diff.c static void stuff_change(struct diff_opt · line 87

Quoted 3 lines
builtin-diff.c +1 -2
-		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.