transport_local: fix cast warnings home/kas/git/public/libgit2/src/transport_local.c: In function ‘cmp_refs’: /home/kas/git/public/libgit2/src/transport_local.c:19:22: warning: cast discards ‘__attribute__((const))’ qualifier from pointer target type [-Wcast-qual] /home/kas/git/public/libgit2/src/transport_local.c:20:22: 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/transport_local.c b/src/transport_local.c
index a9f6678..64ac183 100644
--- a/src/transport_local.c
+++ b/src/transport_local.c
@@ -16,8 +16,8 @@ typedef struct {
static int cmp_refs(const void *a, const void *b)
{
- const char *stra = *(const char **) a;
- const char *strb = *(const char **) b;
+ const char *stra = *(const char * const *) a;
+ const char *strb = *(const char * const *) b;
return strcmp(stra, strb);
}