Fix warnings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
diff --git a/examples/blame.c b/examples/blame.c
index 95bce6b..06310d5 100644
--- a/examples/blame.c
+++ b/examples/blame.c
@@ -114,7 +114,7 @@ int main(int argc, char *argv[])
rawdata+i);
}
- i = eol - rawdata + 1;
+ i = (int)(eol - rawdata + 1);
line++;
}
diff --git a/src/netops.c b/src/netops.c
index d7f17b1..592e464 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -662,7 +662,7 @@ void gitno_connection_data_free_ptrs(gitno_connection_data *d)
static char* unescape(char *str)
{
int x, y;
- int len = strlen(str);
+ size_t len = strlen(str);
for (x=y=0; str[y]; ++x, ++y) {
if ((str[x] = str[y]) == '%') {
diff --git a/src/pack-objects.c b/src/pack-objects.c
index 9967cab..2d62507 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -272,7 +272,7 @@ static int write_object(git_buf *buf, git_packbuilder *pb, git_pobject *po)
git_buf zbuf = GIT_BUF_INIT;
git_otype type;
unsigned char hdr[10];
- unsigned int hdr_len;
+ size_t hdr_len;
unsigned long size;
void *data;
diff --git a/src/push.c b/src/push.c
index 4f442c6..5ad15e3 100644
--- a/src/push.c
+++ b/src/push.c
@@ -618,7 +618,7 @@ on_error:
static int filter_refs(git_remote *remote)
{
- const git_remote_head **heads;
+ git_remote_head **heads;
size_t heads_len, i;
git_vector_clear(&remote->refs);