From 803ca5cb92035f6d06c55b41e2863ae629aa877c Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Fri, 15 Jul 2011 15:31:17 +0300 Subject: [PATCH] revwalk: fix cast warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/kas/git/public/libgit2/src/revwalk.c: In function ‘object_table_hash’: /home/kas/git/public/libgit2/src/revwalk.c:120:7: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] Signed-off-by: Kirill A. Shutemov --- src/revwalk.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/revwalk.c b/src/revwalk.c index e0b6cbe1d..f7a56ccf5 100644 --- a/src/revwalk.c +++ b/src/revwalk.c @@ -115,9 +115,8 @@ static int commit_time_cmp(void *a, void *b) static uint32_t object_table_hash(const void *key, int hash_id) { uint32_t r; - git_oid *id; + const git_oid *id = key; - id = (git_oid *)key; memcpy(&r, id->id + (hash_id * sizeof(uint32_t)), sizeof(r)); return r; }