diff options
| author | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:55:22 +0300 |
|---|---|---|
| committer | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:55:22 +0300 |
| commit | d568d5856bcc4f283ae1dda0e27d680ee22fb067 (patch) | |
| tree | af00ec95f08de8425111d3f57474b6ad63f826b1 /tests | |
| parent | 51d0044629d0ac3e0f419910996c972b547f1156 (diff) | |
| download | libgit2-d568d5856bcc4f283ae1dda0e27d680ee22fb067.tar.gz | |
CMakefile: add -Wmissing-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/t04-commit.c | 9 | ||||
| -rw-r--r-- | tests/t07-hashtable.c | 4 | ||||
| -rw-r--r-- | tests/t12-repo.c | 4 | ||||
| -rwxr-xr-x | tests/test_lib.h | 1 |
4 files changed, 8 insertions, 10 deletions
diff --git a/tests/t04-commit.c b/tests/t04-commit.c index a8617ed6..88c7efd8 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 7313f2cc..c0e85225 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 cc8942f4..61e96d68 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 fc75ed77..9d90e484 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); |
