diff options
| author | Vicent Martà <tanoku@gmail.com> | 2012-06-07 22:43:03 +0200 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2012-06-07 22:43:48 +0200 |
| commit | 3f0358604e48432b53abf097aa3ab6a1e3639813 (patch) | |
| tree | c132a79507bb39fc37abb49e361f2f720bc69737 /tests-clar | |
| parent | 763b838152244c0d7433cde0046e9f67369074e3 (diff) | |
| download | libgit2-3f0358604e48432b53abf097aa3ab6a1e3639813.tar.gz | |
misc: Fix warnings from PVS Studio trial
Diffstat (limited to 'tests-clar')
| -rw-r--r-- | tests-clar/core/filebuf.c | 4 | ||||
| -rw-r--r-- | tests-clar/index/tests.c | 2 | ||||
| -rw-r--r-- | tests-clar/object/tree/write.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests-clar/core/filebuf.c b/tests-clar/core/filebuf.c index eab8a26eb..4451c01c7 100644 --- a/tests-clar/core/filebuf.c +++ b/tests-clar/core/filebuf.c @@ -8,7 +8,7 @@ void test_core_filebuf__0(void) int fd; char test[] = "test", testlock[] = "test.lock"; - fd = p_creat(testlock, 0744); + fd = p_creat(testlock, 0744); //-V536 cl_must_pass(fd); cl_must_pass(p_close(fd)); @@ -27,7 +27,7 @@ void test_core_filebuf__1(void) int fd; char test[] = "test"; - fd = p_creat(test, 0666); + fd = p_creat(test, 0666); //-V536 cl_must_pass(fd); cl_must_pass(p_write(fd, "libgit2 rocks\n", 14)); cl_must_pass(p_close(fd)); diff --git a/tests-clar/index/tests.c b/tests-clar/index/tests.c index 3436f8d1e..a535d6815 100644 --- a/tests-clar/index/tests.c +++ b/tests-clar/index/tests.c @@ -33,7 +33,7 @@ static void copy_file(const char *src, const char *dst) cl_git_pass(git_futils_readbuffer(&source_buf, src)); - dst_fd = git_futils_creat_withpath(dst, 0777, 0666); + dst_fd = git_futils_creat_withpath(dst, 0777, 0666); //-V536 if (dst_fd < 0) goto cleanup; diff --git a/tests-clar/object/tree/write.c b/tests-clar/object/tree/write.c index 3911f6f0e..e6dc549a5 100644 --- a/tests-clar/object/tree/write.c +++ b/tests-clar/object/tree/write.c @@ -63,14 +63,14 @@ void test_object_tree_write__subtree(void) //create subtree cl_git_pass(git_treebuilder_create(&builder, NULL)); - cl_git_pass(git_treebuilder_insert(NULL,builder,"new.txt",&bid,0100644)); + cl_git_pass(git_treebuilder_insert(NULL,builder,"new.txt",&bid,0100644)); //-V536 cl_git_pass(git_treebuilder_write(&subtree_id, g_repo, builder)); git_treebuilder_free(builder); // create parent tree cl_git_pass(git_tree_lookup(&tree, g_repo, &id)); cl_git_pass(git_treebuilder_create(&builder, tree)); - cl_git_pass(git_treebuilder_insert(NULL,builder,"new",&subtree_id,040000)); + cl_git_pass(git_treebuilder_insert(NULL,builder,"new",&subtree_id,040000)); //-V536 cl_git_pass(git_treebuilder_write(&id_hiearar, g_repo, builder)); git_treebuilder_free(builder); git_tree_free(tree); |
