Fix a couple of warnings
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
diff --git a/src/remote.c b/src/remote.c
index 5c7a808..d3a2c45 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -914,7 +914,7 @@ static int rename_one_remote_reference(
const char *old_remote_name,
const char *new_remote_name)
{
- int error;
+ int error = -1;
git_buf new_name = GIT_BUF_INIT;
git_reference *reference = NULL;
diff --git a/tests-clar/stash/foreach.c b/tests-clar/stash/foreach.c
index 8086507..818d906 100644
--- a/tests-clar/stash/foreach.c
+++ b/tests-clar/stash/foreach.c
@@ -39,10 +39,11 @@ static int callback_cb(
const git_oid *stash_oid,
void *payload)
{
- int i = 0;
- bool found = false;
struct callback_data *data = (struct callback_data *)payload;
+ GIT_UNUSED(index);
+ GIT_UNUSED(message);
+
cl_assert_equal_i(0, git_oid_streq(stash_oid, data->oids[data->invokes++]));
return 0;
diff --git a/tests-clar/stash/stash_helpers.c b/tests-clar/stash/stash_helpers.c
index f646ef2..35017ce 100644
--- a/tests-clar/stash/stash_helpers.c
+++ b/tests-clar/stash/stash_helpers.c
@@ -1,5 +1,6 @@
#include "clar_libgit2.h"
#include "fileops.h"
+#include "stash_helpers.h"
void commit_staged_files(
git_oid *commit_oid,