From 63daae47e59b72ebec3595ca3e9917e6c595c814 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 22 Jun 2007 23:19:43 -0700 Subject: Two trivial -Wcast-qual fixes Luiz Fernando N. Capitulino noticed the one in tree-walk.h where we cast away constness while computing the legnth of a tree entry. Signed-off-by: Junio C Hamano --- tree-walk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tree-walk.h') diff --git a/tree-walk.h b/tree-walk.h index ee747aba0..db0fbdc70 100644 --- a/tree-walk.h +++ b/tree-walk.h @@ -22,7 +22,7 @@ static inline const unsigned char *tree_entry_extract(struct tree_desc *desc, co static inline int tree_entry_len(const char *name, const unsigned char *sha1) { - return (char *)sha1 - (char *)name - 1; + return (const char *)sha1 - name - 1; } void update_tree_entry(struct tree_desc *); -- cgit v1.2.1