diff options
author | Yang Tse <yangsita@gmail.com> | 2008-02-19 15:07:50 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-02-19 15:07:50 +0000 |
commit | d2125cf50142ae3e292881af4a2490d4b14d764c (patch) | |
tree | 493ce745fe40f1789d5cb9c8a39fd959d679af64 | |
parent | c9eb41c0569c02da57c98690715456dbe7279ca7 (diff) |
fix compiler warnings: 'enumerated type mixed with another type'
-rw-r--r-- | lib/ssh.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -234,6 +234,9 @@ static CURLcode sftp_libssh2_error_to_CURLE(unsigned long err) case LIBSSH2_FX_OK: return CURLE_OK; + case LIBSSH2_ERROR_ALLOC: + return CURLE_OUT_OF_MEMORY; + case LIBSSH2_FX_NO_SUCH_FILE: case LIBSSH2_FX_NO_SUCH_PATH: 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)); if(sshc->secondCreateDirs) { state(conn, SSH_SFTP_CLOSE); - sshc->actualcode = err; + sshc->actualcode = sftp_libssh2_error_to_CURLE(err); break; } 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) { 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", sftp_libssh2_strerror(err), 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, &err_msg, NULL, 0); - err = libssh2_session_error_to_CURLE(ssh_err); failf(conn->data, "%s", err_msg); state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = err; + sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); break; } } @@ -1694,10 +1696,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn) ssh_err = libssh2_session_last_error(sshc->ssh_session, &err_msg, NULL, 0); - err = libssh2_session_error_to_CURLE(ssh_err); failf(conn->data, "%s", err_msg); state(conn, SSH_SCP_CHANNEL_FREE); - sshc->actualcode = err; + sshc->actualcode = libssh2_session_error_to_CURLE(ssh_err); break; } } |