mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
fix compiler warnings: 'enumerated type mixed with another type'
This commit is contained in:
parent
c9eb41c056
commit
d2125cf501
13
lib/ssh.c
13
lib/ssh.c
@ -234,6 +234,9 @@ static CURLcode sftp_libssh2_error_to_CURLE(unsigned long err)
|
|||||||
case LIBSSH2_FX_OK:
|
case LIBSSH2_FX_OK:
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
|
|
||||||
|
case LIBSSH2_ERROR_ALLOC:
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
|
||||||
case LIBSSH2_FX_NO_SUCH_FILE:
|
case LIBSSH2_FX_NO_SUCH_FILE:
|
||||||
case LIBSSH2_FX_NO_SUCH_PATH:
|
case LIBSSH2_FX_NO_SUCH_PATH:
|
||||||
return CURLE_REMOTE_FILE_NOT_FOUND;
|
return CURLE_REMOTE_FILE_NOT_FOUND;
|
||||||
@ -1206,7 +1209,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
failf(data, "Upload failed: %s", sftp_libssh2_strerror(err));
|
failf(data, "Upload failed: %s", sftp_libssh2_strerror(err));
|
||||||
if(sshc->secondCreateDirs) {
|
if(sshc->secondCreateDirs) {
|
||||||
state(conn, SSH_SFTP_CLOSE);
|
state(conn, SSH_SFTP_CLOSE);
|
||||||
sshc->actualcode = err;
|
sshc->actualcode = sftp_libssh2_error_to_CURLE(err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if(((err == LIBSSH2_FX_NO_SUCH_FILE) ||
|
else if(((err == LIBSSH2_FX_NO_SUCH_FILE) ||
|
||||||
@ -1415,7 +1418,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
}
|
}
|
||||||
else if(sshc->readdir_len <= 0) {
|
else if(sshc->readdir_len <= 0) {
|
||||||
err = libssh2_sftp_last_error(sshc->sftp_session);
|
err = libssh2_sftp_last_error(sshc->sftp_session);
|
||||||
sshc->actualcode = err;
|
sshc->actualcode = sftp_libssh2_error_to_CURLE(err);
|
||||||
failf(data, "Could not open remote file for reading: %s :: %d",
|
failf(data, "Could not open remote file for reading: %s :: %d",
|
||||||
sftp_libssh2_strerror(err),
|
sftp_libssh2_strerror(err),
|
||||||
libssh2_session_last_errno(sshc->ssh_session));
|
libssh2_session_last_errno(sshc->ssh_session));
|
||||||
@ -1647,10 +1650,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
|
|
||||||
ssh_err = libssh2_session_last_error(sshc->ssh_session,
|
ssh_err = libssh2_session_last_error(sshc->ssh_session,
|
||||||
&err_msg, NULL, 0);
|
&err_msg, NULL, 0);
|
||||||
err = libssh2_session_error_to_CURLE(ssh_err);
|
|
||||||
failf(conn->data, "%s", err_msg);
|
failf(conn->data, "%s", err_msg);
|
||||||
state(conn, SSH_SCP_CHANNEL_FREE);
|
state(conn, SSH_SCP_CHANNEL_FREE);
|
||||||
sshc->actualcode = err;
|
sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1694,10 +1696,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn)
|
|||||||
|
|
||||||
ssh_err = libssh2_session_last_error(sshc->ssh_session,
|
ssh_err = libssh2_session_last_error(sshc->ssh_session,
|
||||||
&err_msg, NULL, 0);
|
&err_msg, NULL, 0);
|
||||||
err = libssh2_session_error_to_CURLE(ssh_err);
|
|
||||||
failf(conn->data, "%s", err_msg);
|
failf(conn->data, "%s", err_msg);
|
||||||
state(conn, SSH_SCP_CHANNEL_FREE);
|
state(conn, SSH_SCP_CHANNEL_FREE);
|
||||||
sshc->actualcode = err;
|
sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user