8000 libssh2: compatibility fixups · libgit2/libgit2@54e7701 · GitHub
[go: up one dir, main page]

Skip to content

Commit 54e7701

Browse files
committed
libssh2: compatibility fixups
1 parent 12eecf0 commit 54e7701

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libgit2/transports/ssh_libssh2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ static int ssh_stream_read(
115115
size_t buf_size,
116116
size_t *bytes_read)
117117
{
118-
int rc;
119118
ssh_stream *s = GIT_CONTAINER_OF(stream, ssh_stream, parent);
119+
ssize_t rc;
120120

121121
*bytes_read = 0;
122122

@@ -135,15 +135,14 @@ static int ssh_stream_read(
135135
*/
136136
if (rc == 0) {
137137
if ((rc = libssh2_channel_read_stderr(s->channel, buffer, buf_size)) > 0) {
138-
git_error_set(GIT_ERROR_SSH, "%*s", rc, buffer);
138+
git_error_set(GIT_ERROR_SSH, "%*s", (int)rc, buffer);
139139
return GIT_EEOF;
140140
} else if (rc < LIBSSH2_ERROR_NONE) {
141141
ssh_error(s->session, "SSH could not read stderr");
142142
return -1;
143143
}
144144
}
145145

146-
147146
*bytes_read = rc;
148147

149148
return 0;
@@ -1015,7 +1014,8 @@ static int list_auth_methods(int *out, LIBSSH2_SESSION *session, const char *use
10151014

10161015
*out = 0;
10171016

1018-
list = libssh2_userauth_list(session, username, strlen(username));
1017+
list = libssh2_userauth_list(session, username,
1018+
(unsigned int)strlen(username));
10191019

10201020
/* either error, or the remote accepts NONE auth, which is bizarre, let's punt */
10211021
if (list == NULL && !libssh2_userauth_authenticated(session)) {

0 commit comments

Comments
 (0)
0