From: Luiz Fernando N. Capitulino Date: Sun, 24 Jun 2007 02:10:21 GMT Subject: Re: [PATCH]: tree-walk.h: Warning fix Message-ID: <20070623231021.40a6f3be@gnut> In-Reply-To: <7v1wg39oqc.fsf@assigned-by-dhcp.pobox.com> Em Fri, 22 Jun 2007 23:19:55 -0700 Junio C Hamano escreveu: | "Luiz Fernando N. Capitulino" | writes: | | > diff --git a/tree-walk.h b/tree-walk.h | > index ee747ab..625198f 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 - (const char *)name - 1; | > } | > | > void update_tree_entry(struct tree_desc *); | | Grumble. Incoming "name" is already (const char*), isn't it? | I'd cast only the sha1 side and apply. Yes, you're right. I'll fix it and apply again. Thanks a lot for the feedback.