Skip to content

Commit 512bd2c

Browse files
committed
Merge pull request libgit2#3747 from libgit2/ethomson/warnings
⚡ some warnings
2 parents 1dc4491 + 0bd7740 commit 512bd2c

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

src/iterator.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ GIT_INLINE(bool) iterator_has_started(
206206
return false;
207207
}
208208

209-
GIT_INLINE(bool) iterator_has_ended(
210-
git_iterator *iter, const char *path, bool is_submodule)
209+
GIT_INLINE(bool) iterator_has_ended(git_iterator *iter, const char *path)
211210
{
212211
if (iter->end == NULL)
213212
return false;
@@ -797,7 +796,7 @@ static int tree_iterator_advance(const git_index_entry **out, git_iterator *i)
797796
continue;
798797

799798
/* if this path is after our end, stop */
800-
if (iterator_has_ended(&iter->base, iter->entry_path.ptr, false)) {
799+
if (iterator_has_ended(&iter->base, iter->entry_path.ptr)) {
801800
error = GIT_ITEROVER;
802801
break;
803802
}
@@ -2034,7 +2033,7 @@ static int index_iterator_advance(
20342033
continue;
20352034
}
20362035

2037-
if (iterator_has_ended(&iter->base, entry->path, is_submodule)) {
2036+
if (iterator_has_ended(&iter->base, entry->path)) {
20382037
error = GIT_ITEROVER;
20392038
break;
20402039
}

src/stransport_stream.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,13 @@ int stransport_certificate(git_cert **out, git_stream *stream)
116116
return 0;
117117
}
118118

119-
int stransport_set_proxy(git_stream *stream, const char *proxy)
119+
int stransport_set_proxy(
120+
git_stream *stream,
121+
const git_proxy_options *proxy_opts)
120122
{
121123
stransport_stream *st = (stransport_stream *) stream;
122124

123-
return git_stream_set_proxy(st->io, proxy);
125+
return git_stream_set_proxy(st->io, proxy_opts);
124126
}
125127

126128
/*

src/transports/smart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ static void git_smart__free(git_transport *transport)
444444
git_pkt_free(p);
445445

446446
git_vector_free(refs);
447-
git__free(t->proxy.url);
447+
git__free((char *)t->proxy.url);
448448

449449
git_strarray_free(&t->custom_headers);
450450

tests/online/clone.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,10 @@ void test_online_clone__start_with_http(void)
666666
static int called_proxy_creds;
667667
static int proxy_creds(git_cred **out, const char *url, const char *username, unsigned int allowed, void *payload)
668668
{
669-
GIT_UNUSED(payload);
669+
GIT_UNUSED(url);
670670
GIT_UNUSED(username);
671+
GIT_UNUSED(allowed);
672+
GIT_UNUSED(payload);
671673

672674
called_proxy_creds = 1;
673675
return git_cred_userpass_plaintext_new(out, _remote_proxy_user, _remote_proxy_pass);

0 commit comments

Comments
 (0)