Fix a couple of warnings

This commit is contained in:
Michael Schubert 2012-11-18 04:27:49 +01:00
parent 0e9ea5d0e3
commit 0066955d97
3 changed files with 3 additions and 4 deletions

View File

@ -1264,7 +1264,7 @@ int git_repository_head_orphan(git_repository *repo)
return 0;
}
int at_least_one_cb(const char *refname, void *payload)
static int at_least_one_cb(const char *refname, void *payload)
{
GIT_UNUSED(refname);
GIT_UNUSED(payload);
@ -1287,7 +1287,7 @@ static int repo_contains_no_reference(git_repository *repo)
int git_repository_is_empty(git_repository *repo)
{
git_reference *head = NULL;
int error, ref_count = 0;
int error;
if (git_reference_lookup(&head, repo, GIT_HEAD_FILE) < 0)
return -1;

View File

@ -268,7 +268,7 @@ static int retrieve_oid_from_reflog(git_oid *oid, git_reference *ref, unsigned i
goto cleanup;
} else {
int i;
unsigned int i;
git_time commit_time;
for (i = 0; i < numentries; i++) {

View File

@ -446,7 +446,6 @@ void test_config_read__can_load_and_parse_an_empty_config_file(void)
void test_config_read__cannot_load_a_non_existing_config_file(void)
{
git_config *cfg;
int i;
cl_assert_equal_i(GIT_ENOTFOUND, git_config_open_ondisk(&cfg, "./no.config"));
}