Clean up warnings and tests
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 63 64 65 66 67
diff --git a/src/posix.c b/src/posix.c
index cecb538..a9a6af9 100644
--- a/src/posix.c
+++ b/src/posix.c
@@ -21,7 +21,7 @@ int p_open(const char *path, int flags, ...)
va_list arg_list;
va_start(arg_list, flags);
- mode = va_arg(arg_list, mode_t);
+ mode = (mode_t)va_arg(arg_list, int);
va_end(arg_list);
}
diff --git a/tests-clar/object/lookup.c b/tests-clar/object/lookup.c
index 4db2ecf..4732865 100644
--- a/tests-clar/object/lookup.c
+++ b/tests-clar/object/lookup.c
@@ -14,22 +14,24 @@ void test_object_lookup__cleanup(void)
git_repository_free(g_repo);
}
-void test_object_lookup__looking_up_an_exisiting_object_by_its_wrong_type_returns_ENOTFOUND(void)
+void test_object_lookup__lookup_wrong_type_returns_enotfound(void)
{
const char *commit = "e90810b8df3e80c413d903f631643c716887138d";
git_oid oid;
git_object *object;
cl_git_pass(git_oid_fromstr(&oid, commit));
- cl_assert_equal_i(GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_TAG));
}
-void test_object_lookup__looking_up_a_non_exisiting_object_returns_ENOTFOUND(void)
+void test_object_lookup__lookup_nonexisting_returns_enotfound(void)
{
const char *unknown = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef";
git_oid oid;
git_object *object;
cl_git_pass(git_oid_fromstr(&oid, unknown));
- cl_assert_equal_i(GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_ANY));
+ cl_assert_equal_i(
+ GIT_ENOTFOUND, git_object_lookup(&object, g_repo, &oid, GIT_OBJ_ANY));
}
diff --git a/tests-clar/status/worktree.c b/tests-clar/status/worktree.c
index 2a647ff..c4c935c 100644
--- a/tests-clar/status/worktree.c
+++ b/tests-clar/status/worktree.c
@@ -389,7 +389,8 @@ void test_status_worktree__issue_592_5(void)
void test_status_worktree__cannot_retrieve_the_status_of_a_bare_repository(void)
{
git_repository *repo;
- int error, status = 0;
+ int error;
+ unsigned int status = 0;
cl_git_pass(git_repository_open(&repo, cl_fixture("testrepo.git")));
@@ -399,4 +400,4 @@ void test_status_worktree__cannot_retrieve_the_status_of_a_bare_repository(void)
cl_assert(error != GIT_ENOTFOUND);
git_repository_free(repo);
-}
\ No newline at end of file
+}