Fix MSVC 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 53 54 55 56 57 58 59 60 61 62
diff --git a/src/cache.c b/src/cache.c
index fdf5c1b..fd42e2c 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -78,7 +78,7 @@ void *git_cache_get(git_cache *cache, const git_oid *oid)
{
const uint32_t *hash;
size_t i, pos, found = 0;
- cache_node *node;
+ cache_node *node = NULL;
hash = (const uint32_t *)oid->id;
diff --git a/src/commit.c b/src/commit.c
index 2670c2e..d5d6ebd 100644
--- a/src/commit.c
+++ b/src/commit.c
@@ -101,7 +101,7 @@ int git_commit_create_v(
oid, repo, update_ref, author, committer, message,
tree_oid, parent_count, oids);
- free(oids);
+ free((void *)oids);
return error;
}
@@ -132,7 +132,7 @@ int git_commit_create_ov(
git_object_id((git_object *)tree),
parent_count, oids);
- free(oids);
+ free((void *)oids);
return error;
}
@@ -160,7 +160,7 @@ int git_commit_create_o(
git_object_id((git_object *)tree),
parent_count, oids);
- free(oids);
+ free((void *)oids);
return error;
}
diff --git a/tests/t13-threads.c b/tests/t13-threads.c
index 62ca73a..3888b70 100644
--- a/tests/t13-threads.c
+++ b/tests/t13-threads.c
@@ -32,13 +32,6 @@ typedef struct {
unsigned int __dummy;
} ttest_obj;
-void *cache0_thread(void *data)
-{
- git_cache *cache = (git_cache*)data;
- unsigned int num;
-
-}
-
BEGIN_TEST(cache0, "run several threads polling the cache at the same time")
END_TEST