summaryrefslogtreecommitdiff
path: root/tests/config
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2020-02-07 11:53:51 +0100
committerPatrick Steinhardt <ps@pks.im>2020-02-07 11:53:51 +0100
commit2e6cbff86e74b6eaa9b90dc8adc205b9d940a481 (patch)
tree43b6f99dc07ff2e61f997de6081bd1ce85c72c09 /tests/config
parent7d65d4cb7d48cd4e4686d911fe10cdec792443cf (diff)
downloadlibgit2-2e6cbff86e74b6eaa9b90dc8adc205b9d940a481.tar.gz
tests: add missing error checks
We should always verify error codes returned by function calls in our test suite to not accidentally miss any weird results. Coverity reported missing checks in several locations, which this commit fixes.
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/global.c2
-rw-r--r--tests/config/new.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/config/global.c b/tests/config/global.c
index b64b71677..ed47d0251 100644
--- a/tests/config/global.c
+++ b/tests/config/global.c
@@ -81,7 +81,7 @@ void test_config_global__lock_missing_global_config(void)
git_config_entry *entry;
git_transaction *transaction;
- p_unlink("home/.gitconfig"); /* No global config */
+ (void)p_unlink("home/.gitconfig"); /* No global config */
cl_git_pass(git_config_open_default(&cfg));
cl_git_pass(git_config_lock(&transaction, cfg));
diff --git a/tests/config/new.c b/tests/config/new.c
index 2f5d83d52..22c330f6f 100644
--- a/tests/config/new.c
+++ b/tests/config/new.c
@@ -30,5 +30,5 @@ void test_config_new__write_new_config(void)
git_buf_dispose(&buf);
git_config_free(config);
- p_unlink(TEST_CONFIG);
+ cl_must_pass(p_unlink(TEST_CONFIG));
}