commit: fix cast warnings /home/kas/git/public/libgit2/src/commit.c: In function ‘commit_parse_buffer’: /home/kas/git/public/libgit2/src/commit.c:186:23: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] /home/kas/git/public/libgit2/src/commit.c:187:27: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
diff --git a/src/commit.c b/src/commit.c
index a6c19e5..7c0965c 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -183,8 +183,8 @@ cleanup:
int commit_parse_buffer(git_commit *commit, const void *data, size_t len)
{
- const char *buffer = (char *)data;
- const char *buffer_end = (char *)data + len;
+ const char *buffer = data;
+ const char *buffer_end = (const char *)data + len;
git_oid parent_oid;
int error;