diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-05-14 22:24:58 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-05-14 22:24:58 +0200 |
commit | d5ed6348c7c2a37e57a153fc685e4a8c931da006 (patch) | |
tree | 70fc92ce4550023a5fefc478fcc12a9f9bcdfcfc | |
parent | 87d6138e2e774b1e343695b6b6ee64904f1fa53a (diff) | |
download | libgit2-d5ed6348c7c2a37e57a153fc685e4a8c931da006.tar.gz |
Fix compilation warnings
-rw-r--r-- | src/notes.c | 5 | ||||
-rw-r--r-- | tests-clar/notes/notes.c | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/notes.c b/src/notes.c index e3fb91f1d..e14ab93af 100644 --- a/src/notes.c +++ b/src/notes.c @@ -456,7 +456,6 @@ static int process_entry_path( void *payload) { int i = 0, j = 0, error = -1, len; - bool is_hex_only = true; git_oid target_oid; git_buf buf = GIT_BUF_INIT; @@ -510,12 +509,10 @@ int git_note_foreach( void *payload) { int error = -1; - unsigned int i; - char *note; git_oid tree_oid; git_iterator *iter = NULL; git_tree *tree = NULL; - git_index_entry *item; + const git_index_entry *item; if (normalize_namespace(¬es_ref, repo) < 0) return -1; diff --git a/tests-clar/notes/notes.c b/tests-clar/notes/notes.c index 228e414f3..9c50f1acb 100644 --- a/tests-clar/notes/notes.c +++ b/tests-clar/notes/notes.c @@ -72,7 +72,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object { git_oid expected_note_oid, expected_target_oid; - int *count = (int *)payload; + unsigned int *count = (unsigned int *)payload; cl_assert(*count < EXPECTATIONS_COUNT); @@ -108,7 +108,7 @@ static int note_list_cb(const git_oid *note_oid, const git_oid *annotated_object void test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace(void) { git_oid note_oid1, note_oid2, note_oid3, note_oid4; - int retrieved_notes = 0; + unsigned int retrieved_notes = 0; create_note(¬e_oid1, "refs/notes/i-can-see-dead-notes", "a65fedf39aefe402d3bb6e24df4d4f5fe4547750", "I decorate a65f\n"); create_note(¬e_oid2, "refs/notes/i-can-see-dead-notes", "c47800c7266a2be04c571c04d5a6614691ea99bd", "I decorate c478\n"); @@ -122,7 +122,8 @@ void test_notes_notes__can_retrieve_a_list_of_notes_for_a_given_namespace(void) void test_notes_notes__retrieving_a_list_of_notes_for_an_unknown_namespace_returns_ENOTFOUND(void) { - int error, retrieved_notes = 0; + int error; + unsigned int retrieved_notes = 0; error = git_note_foreach(_repo, "refs/notes/i-am-not", note_list_cb, &retrieved_notes); cl_git_fail(error); |