summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/t00-core.c2
-rw-r--r--tests/t04-commit.c9
-rw-r--r--tests/t07-hashtable.c4
-rw-r--r--tests/t12-repo.c4
-rwxr-xr-xtests/test_lib.h1
5 files changed, 9 insertions, 11 deletions
diff --git a/tests/t00-core.c b/tests/t00-core.c
index 6d63d1ce1..5d1a7ac7c 100644
--- a/tests/t00-core.c
+++ b/tests/t00-core.c
@@ -506,7 +506,7 @@ END_TEST
static char *empty_tmp_dir = "test_gitfo_rmdir_recurs_test";
-static int setup_empty_tmp_dir()
+static int setup_empty_tmp_dir(void)
{
char path[GIT_PATH_MAX];
diff --git a/tests/t04-commit.c b/tests/t04-commit.c
index a8617ed6a..88c7efd81 100644
--- a/tests/t04-commit.c
+++ b/tests/t04-commit.c
@@ -498,9 +498,6 @@ BEGIN_TEST(signature4, "creating a zero character signature")
END_TEST
-/* External declaration for testing the buffer parsing method */
-int commit_parse_buffer(git_commit *commit, void *data, size_t len);
-
BEGIN_TEST(parse2, "parse a whole commit buffer")
const int broken_commit_count = sizeof(test_commits_broken) / sizeof(*test_commits_broken);
const int working_commit_count = sizeof(test_commits_working) / sizeof(*test_commits_working);
@@ -516,7 +513,7 @@ BEGIN_TEST(parse2, "parse a whole commit buffer")
memset(commit, 0x0, sizeof(git_commit));
commit->object.repo = repo;
- must_fail(commit_parse_buffer(
+ must_fail(git_commit__parse_buffer(
commit,
test_commits_broken[i],
strlen(test_commits_broken[i]))
@@ -532,7 +529,7 @@ BEGIN_TEST(parse2, "parse a whole commit buffer")
memset(commit, 0x0, sizeof(git_commit));
commit->object.repo = repo;
- must_pass(commit_parse_buffer(
+ must_pass(git_commit__parse_buffer(
commit,
test_commits_working[i],
strlen(test_commits_working[i]))
@@ -544,7 +541,7 @@ BEGIN_TEST(parse2, "parse a whole commit buffer")
memset(commit, 0x0, sizeof(git_commit));
commit->object.repo = repo;
- must_pass(commit_parse_buffer(
+ must_pass(git_commit__parse_buffer(
commit,
test_commits_working[i],
strlen(test_commits_working[i]))
diff --git a/tests/t07-hashtable.c b/tests/t07-hashtable.c
index 7313f2cc9..c0e852259 100644
--- a/tests/t07-hashtable.c
+++ b/tests/t07-hashtable.c
@@ -34,7 +34,7 @@ typedef struct _aux_object {
int visited;
} table_item;
-uint32_t hash_func(const void *key, int hash_id)
+static uint32_t hash_func(const void *key, int hash_id)
{
uint32_t r;
const git_oid *id = key;
@@ -43,7 +43,7 @@ uint32_t hash_func(const void *key, int hash_id)
return r;
}
-int hash_cmpkey(const void *a, const void *b)
+static int hash_cmpkey(const void *a, const void *b)
{
return git_oid_cmp(a, b);
}
diff --git a/tests/t12-repo.c b/tests/t12-repo.c
index 1d9132cfd..de921f9ca 100644
--- a/tests/t12-repo.c
+++ b/tests/t12-repo.c
@@ -34,7 +34,7 @@ typedef struct {
int position;
} fake_backend;
-git_odb_backend *new_backend(int position)
+static git_odb_backend *new_backend(int position)
{
fake_backend *b;
@@ -47,7 +47,7 @@ git_odb_backend *new_backend(int position)
return (git_odb_backend *)b;
}
-int test_backend_sorting(git_odb *odb)
+static int test_backend_sorting(git_odb *odb)
{
unsigned int i;
diff --git a/tests/test_lib.h b/tests/test_lib.h
index fc75ed771..9d90e4847 100755
--- a/tests/test_lib.h
+++ b/tests/test_lib.h
@@ -13,6 +13,7 @@
#define SUITE_NAME(SNAME) libgit2_suite_##SNAME
#define BEGIN_SUITE(SNAME) \
+ git_testsuite *libgit2_suite_##SNAME(void);\
git_testsuite *libgit2_suite_##SNAME(void) {\
git_testsuite *_gitsuite = git_testsuite_new(#SNAME);