mirror of https://github.com/wolfSSL/wolfssh.git
Maintenance
1. Clean up a few compiler warnings. 2. Between Windows, MacOS, and Linux, the %llu printf tag varies slightly, add a typecast of the word64 to unsigned long long to hush the compiler warning.pull/197/head
parent
acd80a1976
commit
365be7d63c
|
@ -53,7 +53,8 @@ static void myStatusCb(WOLFSSH* sshIn, word32* bytes, char* name)
|
||||||
{
|
{
|
||||||
char buf[80];
|
char buf[80];
|
||||||
word64 longBytes = ((word64)bytes[1] << 32) | bytes[0];
|
word64 longBytes = ((word64)bytes[1] << 32) | bytes[0];
|
||||||
WSNPRINTF(buf, sizeof(buf), "Processed %8ld\t bytes \r", longBytes);
|
WSNPRINTF(buf, sizeof(buf), "Processed %8llu\t bytes \r",
|
||||||
|
(unsigned long long)longBytes);
|
||||||
WFPUTS(buf, fout);
|
WFPUTS(buf, fout);
|
||||||
(void)name;
|
(void)name;
|
||||||
(void)sshIn;
|
(void)sshIn;
|
||||||
|
@ -1229,7 +1230,7 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
|
||||||
(word32)WSTRLEN(hanselPublicEcc),
|
(word32)WSTRLEN(hanselPublicEcc),
|
||||||
(byte*)userPublicKey, &userPublicKeySz);
|
(byte*)userPublicKey, &userPublicKeySz);
|
||||||
|
|
||||||
strncpy((char*)userPublicKeyType, "ecdsa-sha2-nistp256",
|
WSTRNCPY((char*)userPublicKeyType, "ecdsa-sha2-nistp256",
|
||||||
sizeof(userPublicKeyType));
|
sizeof(userPublicKeyType));
|
||||||
userPrivateKey = hanselPrivateEcc;
|
userPrivateKey = hanselPrivateEcc;
|
||||||
userPrivateKeySz = hanselPrivateEccSz;
|
userPrivateKeySz = hanselPrivateEccSz;
|
||||||
|
@ -1240,7 +1241,7 @@ THREAD_RETURN WOLFSSH_THREAD sftpclient_test(void* args)
|
||||||
(word32)WSTRLEN(hanselPublicRsa),
|
(word32)WSTRLEN(hanselPublicRsa),
|
||||||
(byte*)userPublicKey, &userPublicKeySz);
|
(byte*)userPublicKey, &userPublicKeySz);
|
||||||
|
|
||||||
strncpy((char*)userPublicKeyType, "ssh-rsa",
|
WSTRNCPY((char*)userPublicKeyType, "ssh-rsa",
|
||||||
sizeof(userPublicKeyType));
|
sizeof(userPublicKeyType));
|
||||||
userPrivateKey = hanselPrivateRsa;
|
userPrivateKey = hanselPrivateRsa;
|
||||||
userPrivateKeySz = hanselPrivateRsaSz;
|
userPrivateKeySz = hanselPrivateRsaSz;
|
||||||
|
|
|
@ -7287,7 +7287,7 @@ int wolfSSH_SFTP_Put(WOLFSSH* ssh, char* from, char* to, byte resume,
|
||||||
if (resume) {
|
if (resume) {
|
||||||
WMEMSET(&state->offset, 0, sizeof(OVERLAPPED));
|
WMEMSET(&state->offset, 0, sizeof(OVERLAPPED));
|
||||||
state->offset.OffsetHigh = 0;
|
state->offset.OffsetHigh = 0;
|
||||||
state->offset.Offset = (DWORD)state->pOfst;
|
state->offset.Offset = state->pOfst[0];
|
||||||
}
|
}
|
||||||
#endif /* USE_WINDOWS_API */
|
#endif /* USE_WINDOWS_API */
|
||||||
state->rSz = 0;
|
state->rSz = 0;
|
||||||
|
@ -7342,7 +7342,7 @@ int wolfSSH_SFTP_Put(WOLFSSH* ssh, char* from, char* to, byte resume,
|
||||||
AddAssign64(state->pOfst, sz);
|
AddAssign64(state->pOfst, sz);
|
||||||
#ifdef USE_WINDOWS_API
|
#ifdef USE_WINDOWS_API
|
||||||
state->offset.OffsetHigh = 0;
|
state->offset.OffsetHigh = 0;
|
||||||
state->offset.Offset = (DWORD)state->pOfst;
|
state->offset.Offset = state->pOfst[0];
|
||||||
#endif /* USE_WINDOWS_API */
|
#endif /* USE_WINDOWS_API */
|
||||||
state->rSz -= sz;
|
state->rSz -= sz;
|
||||||
if (statusCb != NULL) {
|
if (statusCb != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue