Code that is using libgit.a, and hence including GIT's headers, may
get this warning:
"""
../tree-walk.h: In function 'tree_entry_len':
../tree-walk.h:25: warning: cast discards qualifiers from pointer target type
../tree-walk.h:25: warning: cast discards qualifiers from pointer target type
"""
This happens because the cast used in tree_entry_len() is discarding
the const qualifier (thanks to Shawn Pearce by noticing this).
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@gmail.com>
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 *);
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html| Davide Libenzi | [patch 7/8] fdmap v2 - implement sys_socket2 |
| Benjamin Herrenschmidt | Re: [PATCH] Remove process freezer from suspend to RAM pathway |
| Greg Kroah-Hartman | [PATCH 011/196] sysfs: Fix a copy-n-paste typo in comment |
| Greg KH | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 0/37] dccp: Feature negotiation - last call for comments |
| Rémi Denis-Courmont | [PATCH] USB host CDC Phonet network interface driver |
| David Miller | [GIT]: Networking |
git: | |
