refs: fix cast warning /home/kas/git/public/libgit2/src/refs.c: In function ‘normalize_name’: /home/kas/git/public/libgit2/src/refs.c:1681:12: 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/refs.c b/src/refs.c
index 8022c2b..e2d5f66 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1679,13 +1679,13 @@ static int check_valid_ref_char(char ch)
static int normalize_name(char *buffer_out, size_t out_size, const char *name, int is_oid_ref)
{
const char *name_end, *buffer_out_start;
- char *current;
+ const char *current;
int contains_a_slash = 0;
assert(name && buffer_out);
buffer_out_start = buffer_out;
- current = (char *)name;
+ current = name;
name_end = name + strlen(name);
/* Terminating null byte */