diff options
author | Pierre-Olivier Latour <pol@mac.com> | 2015-06-15 09:52:40 -0700 |
---|---|---|
committer | Pierre-Olivier Latour <pol@mac.com> | 2015-06-15 09:55:12 -0700 |
commit | 0f4d9c03676f4226f6af705ae3ad06fcc5a82eb5 (patch) | |
tree | 7f88a390ac9618be23afb462deb0153302b186f5 /tests | |
parent | f621f087b2cb6f124a64a57ce2e0113dc92d53bb (diff) | |
download | libgit2-0f4d9c03676f4226f6af705ae3ad06fcc5a82eb5.tar.gz |
Fixed Xcode 6.1 build warnings
Diffstat (limited to 'tests')
-rw-r--r-- | tests/core/iconv.c | 6 | ||||
-rw-r--r-- | tests/diff/binary.c | 24 | ||||
-rw-r--r-- | tests/diff/diff_helpers.c | 2 |
3 files changed, 20 insertions, 12 deletions
diff --git a/tests/core/iconv.c b/tests/core/iconv.c index cb85f458a..498094bdb 100644 --- a/tests/core/iconv.c +++ b/tests/core/iconv.c @@ -24,7 +24,7 @@ void test_core_iconv__cleanup(void) void test_core_iconv__unchanged(void) { #ifdef GIT_USE_ICONV - char *data = "Ascii data", *original = data; + const char *data = "Ascii data", *original = data; size_t datalen = strlen(data); cl_git_pass(git_path_iconv(&ic, &data, &datalen)); @@ -38,7 +38,7 @@ void test_core_iconv__unchanged(void) void test_core_iconv__decomposed_to_precomposed(void) { #ifdef GIT_USE_ICONV - char *data = nfd; + const char *data = nfd; size_t datalen, nfdlen = strlen(nfd); datalen = nfdlen; @@ -64,7 +64,7 @@ void test_core_iconv__decomposed_to_precomposed(void) void test_core_iconv__precomposed_is_unmodified(void) { #ifdef GIT_USE_ICONV - char *data = nfc; + const char *data = nfc; size_t datalen = strlen(nfc); cl_git_pass(git_path_iconv(&ic, &data, &datalen)); diff --git a/tests/diff/binary.c b/tests/diff/binary.c index 7fac1c518..424a53e5f 100644 --- a/tests/diff/binary.c +++ b/tests/diff/binary.c @@ -317,6 +317,8 @@ static int print_cb( { git_buf *buf = (git_buf *)payload; + GIT_UNUSED(delta); + if (hunk) git_buf_put(buf, hunk->header, hunk->header_len); @@ -382,6 +384,8 @@ static int file_cb( { struct diff_data *diff_data = payload; + GIT_UNUSED(progress); + if (delta->old_file.path) diff_data->old_path = git__strdup(delta->old_file.path); @@ -401,6 +405,8 @@ static int binary_cb( { struct diff_data *diff_data = payload; + GIT_UNUSED(delta); + git_buf_encode_base85(&diff_data->old_binary_base85, binary->old_file.data, binary->old_file.datalen); diff_data->old_binary_inflatedlen = binary->old_file.inflatedlen; @@ -419,6 +425,10 @@ static int hunk_cb( const git_diff_hunk *hunk, void *payload) { + GIT_UNUSED(delta); + GIT_UNUSED(hunk); + GIT_UNUSED(payload); + cl_fail("did not expect hunk callback"); return 0; } @@ -429,6 +439,11 @@ static int line_cb( const git_diff_line *line, void *payload) { + GIT_UNUSED(delta); + GIT_UNUSED(hunk); + GIT_UNUSED(line); + GIT_UNUSED(payload); + cl_fail("did not expect line callback"); return 0; } @@ -440,15 +455,6 @@ void test_diff_binary__blob_to_blob(void) git_blob *old_blob, *new_blob; git_oid old_id, new_id; struct diff_data diff_data = {0}; - const char *expected = - "diff --git a/untimely.txt b/untimely.txt\n" \ - "index 9a69d960ae94b060f56c2a8702545e2bb1abb935..1111d4f11f4b35bf6759e0fb714fe09731ef0840 100644\n" \ - "GIT binary patch\n" \ - "delta 32\n" \ - "nc%1vf+QYWt3zLL@hC)e3Vu?a>QDRl4f_G*?PG(-ZA}<#J$+QbW\n" \ - "\n" \ - "delta 7\n" \ - "Oc%18D`@*{63ljhg(E~C7\n"; opts.flags = GIT_DIFF_SHOW_BINARY | GIT_DIFF_FORCE_BINARY; opts.id_abbrev = GIT_OID_HEXSZ; diff --git a/tests/diff/diff_helpers.c b/tests/diff/diff_helpers.c index c7352571c..c6cdf803f 100644 --- a/tests/diff/diff_helpers.c +++ b/tests/diff/diff_helpers.c @@ -164,6 +164,8 @@ int diff_foreach_via_iterator( { size_t d, num_d = git_diff_num_deltas(diff); + GIT_UNUSED(binary_cb); + for (d = 0; d < num_d; ++d) { git_patch *patch; const git_diff_delta *delta; |